mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 11:01:27 +08:00
[ctypes] Add _layout_ attribute for ctypes.Structure (#15091)
This commit is contained in:
1 parent
a1d94e7121
commit
1df82ed1bf
1 file changed
+5
-1
+5
-1
@@ -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: ...
|
||||
|
||||
Reference in new issue
Block a user