mirror of
https://github.com/wassname/pyreadline.git
synced 2026-06-27 16:10:38 +08:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user