Use pydll to poke into extension library

Causes an error in Py 3.6 in debug mode.

Close #505
This commit is contained in:
Daniele Varrazzo 2017-02-07 11:37:41 +00:00
parent 7210287e76
commit 791befca18

View File

@ -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