mirror of
https://github.com/python/cpython
synced 2026-09-28 06:28:21 +03:00
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
35d273825a
commit
cd9a56c2b0
30 changed files with 970 additions and 19 deletions
|
|
@ -1171,6 +1171,26 @@ and :c:type:`PyType_Type` effectively act as defaults.)
|
|||
:c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass.
|
||||
|
||||
|
||||
.. data:: Py_TPFLAGS_ITEMS_AT_END
|
||||
|
||||
Only usable with variable-size types, i.e. ones with non-zero
|
||||
:c:member:`~PyObject.tp_itemsize`.
|
||||
|
||||
Indicates that the variable-sized portion of an instance of this type is
|
||||
at the end of the instance's memory area, at an offset of
|
||||
:c:expr:`Py_TYPE(obj)->tp_basicsize` (which may be different in each
|
||||
subclass).
|
||||
|
||||
When setting this flag, be sure that all superclasses either
|
||||
use this memory layout, or are not variable-sized.
|
||||
Python does not check this.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
|
||||
**Inheritance:**
|
||||
|
||||
This flag is inherited.
|
||||
|
||||
.. XXX Document more flags here?
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue