mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Use pydll to poke into extension library
Causes an error in Py 3.6 in debug mode. Close #505
This commit is contained in:
parent
7210287e76
commit
791befca18
|
@ -452,7 +452,7 @@ class ByteaParserTest(unittest.TestCase):
|
||||||
expected.
|
expected.
|
||||||
"""
|
"""
|
||||||
import ctypes
|
import ctypes
|
||||||
lib = ctypes.cdll.LoadLibrary(psycopg2._psycopg.__file__)
|
lib = ctypes.pydll.LoadLibrary(psycopg2._psycopg.__file__)
|
||||||
cast = lib.typecast_BINARY_cast
|
cast = lib.typecast_BINARY_cast
|
||||||
cast.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.py_object]
|
cast.argtypes = [ctypes.c_char_p, ctypes.c_size_t, ctypes.py_object]
|
||||||
cast.restype = ctypes.py_object
|
cast.restype = ctypes.py_object
|
||||||
|
|
Loading…
Reference in New Issue
Block a user