_ctypes: add stubs (#8582)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
This commit is contained in:
junkmd
2022-08-24 04:22:12 +09:00
committed by GitHub
parent 1e33759f09
commit 2066b9533c
7 changed files with 59 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ _collections_abc: 3.3-
_compat_pickle: 3.1-
_compression: 3.5-
_csv: 2.7-
_ctypes: 2.7-
_curses: 2.7-
_decimal: 3.3-
_dummy_thread: 3.0-3.8

16
stdlib/_ctypes.pyi Normal file
View File

@@ -0,0 +1,16 @@
import sys
from ctypes import _CArgObject, _PointerLike
from typing_extensions import TypeAlias
if sys.platform == "win32":
# Description, Source, HelpFile, HelpContext, scode
_COMError_Details: TypeAlias = tuple[str | None, str | None, str | None, int | None, int | None]
class COMError(Exception):
hresult: int
text: str | None
details: _COMError_Details
def __init__(self, hresult: int, text: str | None, details: _COMError_Details) -> None: ...
def CopyComPointer(src: _PointerLike, dst: _PointerLike | _CArgObject) -> int: ...