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:
Petr Viktorin 2023-05-04 09:56:53 +02:00 • committed by GitHub
parent 35d273825a
commit cd9a56c2b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 970 additions and 19 deletions

View file

@ -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?