fix ctypes.GetLastError (#13379)

This commit is contained in:
Stephen Morton
2025-01-09 19:03:56 -08:00
committed by GitHub
parent 46cbe78e4c
commit 2a030be2e9
2 changed files with 8 additions and 2 deletions

View File

@@ -159,7 +159,14 @@ def ARRAY(typ: _CT, len: int) -> Array[_CT]: ... # Soft Deprecated, no plans to
if sys.platform == "win32":
def DllCanUnloadNow() -> int: ...
def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO not documented
def GetLastError() -> int: ...
# Actually just an instance of _NamedFuncPointer (aka _CDLLFuncPointer),
# but we want to set a more specific __call__
@type_check_only
class _GetLastErrorFunctionType(_NamedFuncPointer):
def __call__(self) -> int: ...
GetLastError: _GetLastErrorFunctionType
# Actually just an instance of _CFunctionType, but we want to set a more
# specific __call__.