diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-27 05:52:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 05:52:54 (GMT) |
commit | d363eb5b0255c055e7b43f5e2c0847f555e1982e (patch) | |
tree | 126be9692e95625c5fb5c32781ef9ca0d21da187 /Doc/extending | |
parent | 8d61a71f9c81619e34d4a30b625922ebc83c561b (diff) | |
download | cpython-d363eb5b0255c055e7b43f5e2c0847f555e1982e.zip cpython-d363eb5b0255c055e7b43f5e2c0847f555e1982e.tar.gz cpython-d363eb5b0255c055e7b43f5e2c0847f555e1982e.tar.bz2 |
gh-107091: Fix some uses of :attr: role (GH-107318)
Fix also formatting of PyMethodDef members.
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes.rst | 2 | ||||
-rw-r--r-- | Doc/extending/newtypes_tutorial.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 7f8f8dd..2582274 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -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 diff --git a/Doc/extending/newtypes_tutorial.rst b/Doc/extending/newtypes_tutorial.rst index 67382df..0cc366b 100644 --- a/Doc/extending/newtypes_tutorial.rst +++ b/Doc/extending/newtypes_tutorial.rst @@ -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) { |