From 277711dd4cb63c8f9371c616a6005503183eb024 Mon Sep 17 00:00:00 2001 From: thexai <58434170+thexai@users.noreply.github.com> Date: Sat, 25 Jul 2026 19:46:26 +0200 Subject: [PATCH] gh-152433: Windows: fix ``ctypes`` error in UWP build --- Lib/ctypes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index 890168cc9809fd6..7ef47d7078721dc 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -562,7 +562,7 @@ def LoadLibrary(self, name): windll = LibraryLoader(WinDLL) oledll = LibraryLoader(OleDLL) - GetLastError = windll.kernel32.GetLastError + from _winapi import GetLastError from _ctypes import get_last_error, set_last_error def WinError(code=None, descr=None):