14 lines
564 B
Diff
14 lines
564 B
Diff
--- a/Lib/ctypes/__init__.py 2013-11-10 11:36:40.000000000 +0400
|
|
+++ b/Lib/ctypes/__init__.py 2014-02-19 09:54:23.552600000 +0400
|
|
@@ -445,7 +445,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.dll" % _sys.version_info[:2], 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])
|