Various ctypes improvements (#11186)

Mostly more attention paid to which classes are actually the same class
This commit is contained in:
Stephen Morton
2024-01-30 22:18:00 -08:00
committed by GitHub
parent 8010e9fef0
commit 9877ed8092
4 changed files with 153 additions and 67 deletions

View File

@@ -2,7 +2,7 @@ import sys
from _typeshed import ReadableBuffer, WriteableBuffer
from abc import abstractmethod
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence
from ctypes import CDLL
from ctypes import CDLL, ArgumentError as ArgumentError
from typing import Any, ClassVar, Generic, TypeVar, overload
from typing_extensions import Self, TypeAlias
@@ -201,8 +201,6 @@ class Array(_CData, Generic[_CT]):
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
class ArgumentError(Exception): ...
def addressof(obj: _CData) -> int: ...
def alignment(obj_or_type: _CData | type[_CData]) -> int: ...
def get_errno() -> int: ...