diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-23 11:50:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-23 11:50:21 (GMT) |
commit | 95a82dcbe74d1ed226a3df0763546f27bd5a6f61 (patch) | |
tree | 0d8bb08b3aa8bcc9a20d48c25bb46f8d56fb3102 /Doc/c-api | |
parent | 074fcf15fa13f09c85e27f53951ef84d02d95454 (diff) | |
download | cpython-95a82dcbe74d1ed226a3df0763546f27bd5a6f61.zip cpython-95a82dcbe74d1ed226a3df0763546f27bd5a6f61.tar.gz cpython-95a82dcbe74d1ed226a3df0763546f27bd5a6f61.tar.bz2 |
[3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113)
(cherry picked from commit 08a228da05a7aec937b65eea21f4091fa3c6b5cf)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/buffer.rst | 4 | ||||
-rw-r--r-- | Doc/c-api/method.rst | 4 | ||||
-rw-r--r-- | Doc/c-api/module.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/type.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/typeobj.rst | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 91d1edd..6e5443f 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -225,7 +225,7 @@ object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical structure of the memory can vary drastically, the consumer uses the *flags* argument to specify the exact buffer type it can handle. -All :c:data:`Py_buffer` fields are unambiguously defined by the request +All :c:type:`Py_buffer` fields are unambiguously defined by the request type. request-independent fields @@ -464,7 +464,7 @@ Buffer-related functions .. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *format) - Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer.format`. + Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:`~Py_buffer.format`. On error, raise an exception and return -1. .. versionadded:: 3.9 diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst index 93ad30c..0d75ab8 100644 --- a/Doc/c-api/method.rst +++ b/Doc/c-api/method.rst @@ -7,8 +7,8 @@ Instance Method Objects .. index:: pair: object; instancemethod -An instance method is a wrapper for a :c:data:`PyCFunction` and the new way -to bind a :c:data:`PyCFunction` to a class object. It replaces the former call +An instance method is a wrapper for a :c:type:`PyCFunction` and the new way +to bind a :c:type:`PyCFunction` to a class object. It replaces the former call ``PyMethod_New(func, NULL, class)``. diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index bc8e3b2..e358c5d 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -145,7 +145,7 @@ or request "multi-phase initialization" by returning the definition struct itsel .. c:member:: PyModuleDef_Base m_base - Always initialize this member to :c:data:`PyModuleDef_HEAD_INIT`. + Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`. .. c:member:: const char *m_name diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index d9dcd22..553d86a 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -215,7 +215,7 @@ Type Objects ``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses are not necessarily defined in the same module as their superclass. See :c:type:`PyCMethod` to get the class that defines the method. - See :c:func:`PyType_GetModuleByDef` for cases when ``PyCMethod`` cannot + See :c:func:`PyType_GetModuleByDef` for cases when :c:type:`!PyCMethod` cannot be used. .. versionadded:: 3.9 diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 33591ed..9aa076b 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -2255,8 +2255,8 @@ Number Object Structures .. note:: - The :c:data:`nb_reserved` field should always be ``NULL``. It - was previously called :c:data:`nb_long`, and was renamed in + The :c:member:`~PyNumberMethods.nb_reserved` field should always be ``NULL``. It + was previously called :c:member:`!nb_long`, and was renamed in Python 3.0.1. .. c:member:: binaryfunc PyNumberMethods.nb_add |