Files
MINGW-packages/mingw-w64-python3/0830-ctypes-python-dll.patch
2015-09-21 15:47:39 +03:00

15 lines
702 B
Diff

diff -Naur Python-3.5.0-orig/Lib/ctypes/__init__.py Python-3.5.0/Lib/ctypes/__init__.py
--- Python-3.5.0-orig/Lib/ctypes/__init__.py 2015-09-13 14:41:20.000000000 +0300
+++ Python-3.5.0/Lib/ctypes/__init__.py 2015-09-21 13:42:40.967700000 +0300
@@ -427,7 +427,9 @@
cdll = LibraryLoader(CDLL)
pydll = LibraryLoader(PyDLL)
-if _os.name in ("nt", "ce"):
+if _os.name == "nt" and _sys.version.find('GCC') >= 0:
+ pythonapi = PyDLL("libpython%d.%d%s.dll" % (_sys.version_info[:2] + (_sys.abiflags,)), None)
+elif _os.name in ("nt", "ce"):
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
elif _sys.platform == "cygwin":
pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])