Removed noop branch from ctypes code (#3234)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/cb76029b47f26e969317f21d118392a699d... commit: cb76029b47f26e969317f21d118392a699d1329e branch: master author: Alex Gaynor <alex.gaynor@gmail.com> committer: Antoine Pitrou <pitrou@free.fr> date: 2017-08-30T13:43:14+02:00 summary: Removed noop branch from ctypes code (#3234) files: M Lib/ctypes/__init__.py diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index f8709683fb6..972ea0ac879 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -440,10 +440,7 @@ def LoadLibrary(self, name): windll = LibraryLoader(WinDLL) oledll = LibraryLoader(OleDLL) - if _os.name == "nt": - GetLastError = windll.kernel32.GetLastError - else: - GetLastError = windll.coredll.GetLastError + GetLastError = windll.kernel32.GetLastError from _ctypes import get_last_error, set_last_error def WinError(code=None, descr=None):
participants (1)
-
Antoine Pitrou