mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset (GH-20026)
This commit is contained in:
parent
ef7973a981
commit
86d69444e7
3 changed files with 18 additions and 5 deletions
|
@ -424,9 +424,11 @@ Accessing attributes of extension types
|
|||
|
||||
Heap allocated types (created using :c:func:`PyType_FromSpec` or similar),
|
||||
``PyMemberDef`` may contain definitions for the special members
|
||||
``__dictoffset__`` and ``__weaklistoffset__``, corresponding to
|
||||
:c:member:`~PyTypeObject.tp_dictoffset` and
|
||||
:c:member:`~PyTypeObject.tp_weaklistoffset` in type objects.
|
||||
``__dictoffset__``, ``__weaklistoffset__`` and ``__vectorcalloffset__``,
|
||||
corresponding to
|
||||
:c:member:`~PyTypeObject.tp_dictoffset`,
|
||||
:c:member:`~PyTypeObject.tp_weaklistoffset` and
|
||||
:c:member:`~PyTypeObject.tp_vectorcall_offset` in type objects.
|
||||
These must be defined with ``T_PYSSIZET`` and ``READONLY``, for example::
|
||||
|
||||
static PyMemberDef spam_type_members[] = {
|
||||
|
|
|
@ -228,6 +228,7 @@ The following functions and structs are used to create
|
|||
* :c:member:`~PyTypeObject.tp_dictoffset`
|
||||
(see :ref:`PyMemberDef <pymemberdef-offsets>`)
|
||||
* :c:member:`~PyTypeObject.tp_vectorcall_offset`
|
||||
(see :ref:`PyMemberDef <pymemberdef-offsets>`)
|
||||
* :c:member:`~PyBufferProcs.bf_getbuffer`
|
||||
* :c:member:`~PyBufferProcs.bf_releasebuffer`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue