We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6f7368 commit 98c5876Copy full SHA for 98c5876
1 file changed
Lib/ctypes/__init__.py
@@ -549,9 +549,13 @@ def LoadLibrary(self, name):
549
550
if _os.name == "nt":
551
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
552
-elif _sys.platform in ["android", "cygwin"]:
+elif _sys.platform in ["android"]:
553
# These are Unix-like platforms which use a dynamically-linked libpython.
554
pythonapi = PyDLL(_sysconfig.get_config_var("LDLIBRARY"))
555
+elif _sys.platform in ["cygwin"]:
556
+ # These platforms must load the DLL file from DLLLIBRARY
557
+ # and not the import library provided by LDLIBRARY.
558
+ pythonapi = PyDLL(_sysconfig.get_config_var("DLLLIBRARY"))
559
else:
560
pythonapi = PyDLL(None)
561
0 commit comments