diff --git a/stdlib/_ctypes.pyi b/stdlib/_ctypes.pyi index c87cf5e326ca..4650dd7fef72 100644 --- a/stdlib/_ctypes.pyi +++ b/stdlib/_ctypes.pyi @@ -5,7 +5,7 @@ from abc import abstractmethod from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence from ctypes import CDLL, ArgumentError as ArgumentError, c_void_p from types import GenericAlias -from typing import Any, ClassVar, Final, Generic, TypeVar, final, overload, type_check_only +from typing import Any, ClassVar, Final, Generic, Literal, TypeVar, final, overload, type_check_only from typing_extensions import Self, TypeAlias _T = TypeVar("_T") @@ -266,6 +266,10 @@ class Structure(_CData, metaclass=_PyCStructType): if sys.version_info >= (3, 13): _align_: ClassVar[int] + if sys.version_info >= (3, 14): + # _layout_ can be defined by the user, but is not always present. + _layout_: ClassVar[Literal["ms", "gcc-sysv"]] + def __init__(self, *args: Any, **kw: Any) -> None: ... def __getattr__(self, name: str) -> Any: ... def __setattr__(self, name: str, value: Any) -> None: ...