Skip to content

Commit 41e9d88

Browse files
committed
Using winmode directly
1 parent bf20386 commit 41e9d88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/ctypes/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,19 +428,19 @@ class _FuncPtr(_CFuncPtr):
428428
def _load_library(self, name, mode, handle, winmode):
429429
if winmode is None:
430430
import nt as _nt
431-
mode = _nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
431+
winmode = _nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
432432
# WINAPI LoadLibrary searches for a DLL if the given name
433433
# is not fully qualified with an explicit drive. For POSIX
434434
# compatibility, and because the DLL search path no longer
435435
# contains the working directory, begin by fully resolving
436436
# any name that contains a path separator.
437437
if name is not None and ('/' in name or '\\' in name):
438438
name = _nt._getfullpathname(name)
439-
mode |= _nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
439+
winmode |= _nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
440440
self._name = name
441441
if handle is not None:
442442
return handle
443-
return _LoadLibrary(self._name, mode)
443+
return _LoadLibrary(self._name, winmode)
444444

445445
else:
446446
def _load_library(self, name, mode, handle, winmode):

0 commit comments

Comments
 (0)