mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 17:54:01 +08:00
Update _ctypes to 3.14 (#14043)
This commit is contained in:
+11
-6
@@ -131,18 +131,23 @@ class _Pointer(_PointerLike, _CData, Generic[_CT], metaclass=_PyCPointerType):
|
||||
def __getitem__(self, key: slice, /) -> list[Any]: ...
|
||||
def __setitem__(self, key: int, value: Any, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def POINTER(type: None, /) -> type[c_void_p]: ...
|
||||
@overload
|
||||
def POINTER(type: type[_CT], /) -> type[_Pointer[_CT]]: ...
|
||||
def pointer(obj: _CT, /) -> _Pointer[_CT]: ...
|
||||
if sys.version_info < (3, 14):
|
||||
@overload
|
||||
def POINTER(type: None, /) -> type[c_void_p]: ...
|
||||
@overload
|
||||
def POINTER(type: type[_CT], /) -> type[_Pointer[_CT]]: ...
|
||||
def pointer(obj: _CT, /) -> _Pointer[_CT]: ...
|
||||
|
||||
# This class is not exposed. It calls itself _ctypes.CArgObject.
|
||||
@final
|
||||
@type_check_only
|
||||
class _CArgObject: ...
|
||||
|
||||
def byref(obj: _CData | _CDataType, offset: int = ...) -> _CArgObject: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def byref(obj: _CData | _CDataType, offset: int = 0, /) -> _CArgObject: ...
|
||||
|
||||
else:
|
||||
def byref(obj: _CData | _CDataType, offset: int = 0) -> _CArgObject: ...
|
||||
|
||||
_ECT: TypeAlias = Callable[[_CData | _CDataType | None, CFuncPtr, tuple[_CData | _CDataType, ...]], _CDataType]
|
||||
_PF: TypeAlias = tuple[int] | tuple[int, str | None] | tuple[int, str | None, Any]
|
||||
|
||||
Reference in New Issue
Block a user