Bad fix for crash on python3, some conflict with 64-bit fix and _strncpy.

Removed restype and argtypes on _strncpy for python3.
This commit is contained in:
Jorgen Stenarson
2011-10-06 21:48:31 +02:00
parent 2fb5df1811
commit 94d2539dfc
+4 -2
View File
@@ -606,9 +606,11 @@ if sys.version_info[:2] < (2, 6):
msvcrt = cdll.msvcrt
else:
msvcrt = cdll.LoadLibrary(ctypes.util.find_msvcrt())
_strncpy = msvcrt.strncpy
_strncpy.restype = c_char_p
_strncpy.argtypes = [c_char_p, c_char_p, c_size_t]
if sys.version [:1] == 2: #Bad fix for crash on python3
_strncpy.restype = c_char_p
_strncpy.argtypes = [c_char_p, c_char_p, c_size_t]
_strdup = msvcrt._strdup
_strdup.restype = c_char_p
_strdup.argtypes = [c_char_p]