Skip to content

Commit ea8dab0

Browse files
committed
Work around c:member not having the noindex option
See ref. https://www.sphinx-doc.org/en/master/usage/domains/index.html#basic-markup
1 parent 5ae4df1 commit ea8dab0

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

Doc/c-api/structures.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ under :ref:`reference counting <countingrefs>`.
3939
Do not use this field directly; instead use functions and macros such as
4040
:c:macro:`!Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`.
4141

42+
The type may be different from `Py_ssize_t` on platforms.
43+
4244
.. c:member:: PyTypeObject* ob_type
4345
4446
The object's type.

Doc/c-api/typeobj.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,9 @@ metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means that it
492492
type objects) *must* have the :c:member:`~PyVarObject.ob_size` field.
493493

494494

495-
.. c:member:: Py_ssize_t PyObject.ob_refcnt
496-
:noindex:
495+
:c:member:`PyObject.ob_refcnt`
497496

498-
This is the type object's reference count, initialized to ``1`` by the
497+
The type object's reference count is initialized to ``1`` by the
499498
``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type
500499
objects <static-types>`, the type's instances (objects whose :c:member:`~PyObject.ob_type`
501500
points back to the type) do *not* count as references. But for
@@ -507,8 +506,7 @@ type objects) *must* have the :c:member:`~PyVarObject.ob_size` field.
507506
This field is not inherited by subtypes.
508507

509508

510-
.. c:member:: PyTypeObject* PyObject.ob_type
511-
:noindex:
509+
:c:member:`PyObject.ob_type`
512510

513511
This is the type's type, in other words its metatype. It is initialized by the
514512
argument to the ``PyObject_HEAD_INIT`` macro, and its value should normally be
@@ -534,15 +532,13 @@ type objects) *must* have the :c:member:`~PyVarObject.ob_size` field.
534532
PyVarObject Slots
535533
-----------------
536534

537-
.. c:member:: Py_ssize_t PyVarObject.ob_size
538-
:noindex:
535+
:c:member:`PyVarObject.ob_size`
539536

540537
For :ref:`statically allocated type objects <static-types>`, this should be
541538
initialized to zero. For :ref:`dynamically allocated type objects
542539
<heap-types>`, this field has a special internal meaning.
543540

544-
This field should be accessed using the :c:func:`Py_SIZE()` and
545-
:c:func:`Py_SET_SIZE()` macros.
541+
This field should be accessed using the :c:func:`Py_SIZE()` macro.
546542

547543
**Inheritance:**
548544

0 commit comments

Comments
 (0)