Move some Windows-specific things from ctypes/__init__.pyi to _ctypes.pyi (#10128)

- `FormatError`
- `get_last_error`
- `set_last_error`
This commit is contained in:
Jun Komoda
2023-05-02 19:21:55 +09:00
committed by GitHub
parent d208d5a833
commit bbeec7cbbf
3 changed files with 7 additions and 12 deletions

View File

@@ -38,6 +38,10 @@ if sys.platform == "win32":
FUNCFLAG_HRESULT: int
FUNCFLAG_STDCALL: int
def FormatError(code: int = ...) -> str: ...
def get_last_error() -> int: ...
def set_last_error(value: int) -> int: ...
class _CDataMeta(type):
# By default mypy complains about the following two methods, because strictly speaking cls
# might not be a Type[_CT]. However this can never actually happen, because the only class that