blob: ec7985102cd08dc57f8883423d9c99eb4677554f [file] [log] [blame]
diff -Naur Python-3.8.0-orig/Lib/ctypes/__init__.py Python-3.8.0/Lib/ctypes/__init__.py
--- Python-3.8.0-orig/Lib/ctypes/__init__.py 2019-10-14 16:34:47.000000000 +0300
+++ Python-3.8.0/Lib/ctypes/__init__.py 2019-10-22 10:03:49.931840600 +0300
@@ -449,7 +449,9 @@
cdll = LibraryLoader(CDLL)
pydll = LibraryLoader(PyDLL)
-if _os.name == "nt":
+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 == "nt":
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
elif _sys.platform == "cygwin":
pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])