gh-107091: Fix some uses of :attr: role (GH-107318)

Fix also formatting of PyMethodDef members.
This commit is contained in:
Serhiy Storchaka 2023-07-27 08:52:54 +03:00 committed by GitHub
parent 8d61a71f9c
commit d363eb5b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 64 additions and 59 deletions

View file

@ -270,7 +270,7 @@ structure::
One entry should be defined for each method provided by the type; no entries are
needed for methods inherited from a base type. One additional entry is needed
at the end; it is a sentinel that marks the end of the array. The
:attr:`ml_name` field of the sentinel must be ``NULL``.
:c:member:`~PyMethodDef.ml_name` field of the sentinel must be ``NULL``.
The second table is used to define attributes which map directly to data stored
in the instance. A variety of primitive C types are supported, and access may

View file

@ -177,7 +177,7 @@ Everything else in the file should be familiar, except for some code in
return;
This initializes the :class:`!Custom` type, filling in a number of members
to the appropriate default values, including :attr:`ob_type` that we initially
to the appropriate default values, including :c:member:`~PyObject.ob_type` that we initially
set to ``NULL``. ::
if (PyModule_AddObjectRef(m, "Custom", (PyObject *) &CustomType) < 0) {