Skip to content

Commit

Permalink
Use the same Sphinx role for Py_TPFLAGS_ITEMS_AT_END as for other typ…
Browse files Browse the repository at this point in the history
…e flags

Now is not the time to fix that.
  • Loading branch information
encukou committed Apr 19, 2023
1 parent 291731b commit 2ba8084
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ Object Protocol
.. c:function:: PyObject* PyObject_GetItemData(PyObject *o)
Get a pointer to per-item data for a class with
:c:macro:`Py_TPFLAGS_ITEMS_AT_END`.
:const:`Py_TPFLAGS_ITEMS_AT_END`.
On error, set an exception and return ``NULL``.
:py:exc:`TypeError` is raised if *o* does not have
:c:macro:`Py_TPFLAGS_ITEMS_AT_END` set.
:const:`Py_TPFLAGS_ITEMS_AT_END` set.
.. versionadded:: 3.12
2 changes: 1 addition & 1 deletion Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ The following functions and structs are used to create
- The requested :c:member:`PyType_Spec.basicsize` is zero,
suggesting that the subclass does not access the instance's memory
directly.
- With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag.
- With the :const:`Py_TPFLAGS_ITEMS_AT_END` flag.
.. c:member:: int flags
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
:c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass.


.. c:macro:: Py_TPFLAGS_ITEMS_AT_END
.. data:: Py_TPFLAGS_ITEMS_AT_END

Only usable with variable-size types, i.e. ones with non-zero
:c:member:`~PyObject.tp_itemsize`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ New Features
inheriting or extending the base class size.
- :c:func:`PyObject_GetTypeData` and :c:func:`PyType_GetTypeDataSize`
added to allow access to subclass-specific instance data.
- :c:macro:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData`
- :const:`Py_TPFLAGS_ITEMS_AT_END` and :c:func:`PyObject_GetItemData`
added to allow safely extending certain variable-sized types, including
:c:var:`PyType_Type`.
- :c:macro:`Py_RELATIVE_OFFSET` added to allow defining
Expand Down

0 comments on commit 2ba8084

Please sign in to comment.