mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-107091: Fix some uses of :attr: role (GH-107318)
Fix also formatting of PyMethodDef members.
This commit is contained in:
parent
8d61a71f9c
commit
d363eb5b02
11 changed files with 64 additions and 59 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue