Commit 39d011ab authored by Maxime Perrotin's avatar Maxime Perrotin

Fix ctypes support on 64bits targets

c_void_p provokes segfaults on 64bits, use workaround
parent fe8914fc
......@@ -257,7 +257,12 @@ def {tmName}(tm_ptr, size):
# Callback function prototype - a void* param, and returning nothing
func = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_long)
# Apparently c_void_p does not work on 64 bits machines... use a workaround:
class ReturnPointer (ctypes.Structure):
pass
ReturnHandle = ctypes.POINTER(ReturnPointer)
func = ctypes.CFUNCTYPE(None, ReturnHandle, ctypes.c_long)
#func = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_long)
cmp_func = func({tmName})
def setSharedLib(dll=None):
......
......@@ -11,7 +11,7 @@ from setuptools import setup, find_packages
setup(
name='dmt',
version="2.1.15",
version="2.1.16",
packages=find_packages(),
author='Thanassis Tsiodras',
author_email='Thanassis.Tsiodras@esa.int',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment