Skip to content

Commit 2b3b2ea

Browse files
Update Lib/ctypes/__init__.py
Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 701ff5b commit 2b3b2ea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/ctypes/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,7 @@ class _FuncPtr(_CFuncPtr):
426426

427427
if _os.name == "nt":
428428
def _load_library(self, name, mode, handle, winmode):
429-
if winmode is not None:
430-
mode = winmode
431-
else:
429+
if winmode is None:
432430
import nt as _nt
433431
mode = _nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
434432
# WINAPI LoadLibrary searches for a DLL if the given name

0 commit comments

Comments
 (0)