Skip to content
Draft

test CI #15057

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions stdlib/_ctypes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,19 @@ class CFuncPtr(_PointerLike, _CData, metaclass=_PyCFuncPtrType):
_GetT = TypeVar("_GetT")
_SetT = TypeVar("_SetT")

# This class is not exposed. It calls itself _ctypes.CField.
@final
@type_check_only
class _CField(Generic[_CT, _GetT, _SetT]):
offset: int
size: int
if sys.version_info >= (3, 14):
name: str
_type_: type[_CT]
byte_offset: int
byte_size: int
is_bitfield: bool
bit_offset: int
bit_size: int
is_anonymous: bool
if sys.version_info >= (3, 10):
@overload
def __get__(self, instance: None, owner: type[Any] | None = None, /) -> Self: ...
Expand Down
3 changes: 3 additions & 0 deletions stdlib/ctypes/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ if sys.version_info >= (3, 14):
else:
from _ctypes import POINTER as POINTER, pointer as pointer

if sys.version_info >= (3, 14):
CField = _CField

DEFAULT_MODE: Final[int]

class ArgumentError(Exception): ...
Expand Down
Loading