Update _ctypes to 3.14 (#14043)

This commit is contained in:
sobolevn
2025-05-13 14:29:49 +03:00
committed by GitHub
parent f8b0eec26c
commit bc244028d7
3 changed files with 27 additions and 17 deletions
+11 -6
View File
@@ -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]