mirror of
https://github.com/wassname/pyreadline.git
synced 2026-10-02 12:40:27 +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:
1 parent
2fb5df1811
commit
94d2539dfc
1 file changed
+4
-2
@@ -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