Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 08a228d

Browse filesBrowse files
gh-107091: Fix the use of some C domain roles (#107092)
1 parent c65592c commit 08a228d
Copy full SHA for 08a228d

File tree

Expand file treeCollapse file tree

11 files changed

+20
-20
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+20
-20
lines changed

‎Doc/c-api/buffer.rst

Copy file name to clipboardExpand all lines: Doc/c-api/buffer.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical
225225
structure of the memory can vary drastically, the consumer uses the *flags*
226226
argument to specify the exact buffer type it can handle.
227227

228-
All :c:data:`Py_buffer` fields are unambiguously defined by the request
228+
All :c:type:`Py_buffer` fields are unambiguously defined by the request
229229
type.
230230

231231
request-independent fields
@@ -464,7 +464,7 @@ Buffer-related functions
464464
465465
.. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *format)
466466
467-
Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer.format`.
467+
Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:`~Py_buffer.format`.
468468
On error, raise an exception and return -1.
469469
470470
.. versionadded:: 3.9

‎Doc/c-api/method.rst

Copy file name to clipboardExpand all lines: Doc/c-api/method.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Instance Method Objects
77

88
.. index:: pair: object; instancemethod
99

10-
An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
11-
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
10+
An instance method is a wrapper for a :c:type:`PyCFunction` and the new way
11+
to bind a :c:type:`PyCFunction` to a class object. It replaces the former call
1212
``PyMethod_New(func, NULL, class)``.
1313

1414

‎Doc/c-api/module.rst

Copy file name to clipboardExpand all lines: Doc/c-api/module.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ or request "multi-phase initialization" by returning the definition struct itsel
145145
146146
.. c:member:: PyModuleDef_Base m_base
147147
148-
Always initialize this member to :c:data:`PyModuleDef_HEAD_INIT`.
148+
Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`.
149149
150150
.. c:member:: const char *m_name
151151

‎Doc/c-api/type.rst

Copy file name to clipboardExpand all lines: Doc/c-api/type.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Type Objects
215215
``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses
216216
are not necessarily defined in the same module as their superclass.
217217
See :c:type:`PyCMethod` to get the class that defines the method.
218-
See :c:func:`PyType_GetModuleByDef` for cases when ``PyCMethod`` cannot
218+
See :c:func:`PyType_GetModuleByDef` for cases when :c:type:`!PyCMethod` cannot
219219
be used.
220220
221221
.. versionadded:: 3.9

‎Doc/c-api/typeobj.rst

Copy file name to clipboardExpand all lines: Doc/c-api/typeobj.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,8 +2255,8 @@ Number Object Structures
22552255

22562256
.. note::
22572257

2258-
The :c:data:`nb_reserved` field should always be ``NULL``. It
2259-
was previously called :c:data:`nb_long`, and was renamed in
2258+
The :c:member:`~PyNumberMethods.nb_reserved` field should always be ``NULL``. It
2259+
was previously called :c:member:`!nb_long`, and was renamed in
22602260
Python 3.0.1.
22612261

22622262
.. c:member:: binaryfunc PyNumberMethods.nb_add

‎Doc/extending/extending.rst

Copy file name to clipboardExpand all lines: Doc/extending/extending.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ Note that the Python name for the exception object is :exc:`spam.error`. The
237237
being :exc:`Exception` (unless another class is passed in instead of ``NULL``),
238238
described in :ref:`bltin-exceptions`.
239239

240-
Note also that the :c:data:`SpamError` variable retains a reference to the newly
240+
Note also that the :c:data:`!SpamError` variable retains a reference to the newly
241241
created exception class; this is intentional! Since the exception could be
242242
removed from the module by external code, an owned reference to the class is
243-
needed to ensure that it will not be discarded, causing :c:data:`SpamError` to
243+
needed to ensure that it will not be discarded, causing :c:data:`!SpamError` to
244244
become a dangling pointer. Should it become a dangling pointer, C code which
245245
raises the exception could cause a core dump or other unintended side effects.
246246

@@ -281,17 +281,17 @@ statement::
281281
It returns ``NULL`` (the error indicator for functions returning object pointers)
282282
if an error is detected in the argument list, relying on the exception set by
283283
:c:func:`PyArg_ParseTuple`. Otherwise the string value of the argument has been
284-
copied to the local variable :c:data:`command`. This is a pointer assignment and
284+
copied to the local variable :c:data:`!command`. This is a pointer assignment and
285285
you are not supposed to modify the string to which it points (so in Standard C,
286-
the variable :c:data:`command` should properly be declared as ``const char
286+
the variable :c:data:`!command` should properly be declared as ``const char
287287
*command``).
288288

289289
The next statement is a call to the Unix function :c:func:`system`, passing it
290290
the string we just got from :c:func:`PyArg_ParseTuple`::
291291

292292
sts = system(command);
293293

294-
Our :func:`spam.system` function must return the value of :c:data:`sts` as a
294+
Our :func:`!spam.system` function must return the value of :c:data:`!sts` as a
295295
Python object. This is done using the function :c:func:`PyLong_FromLong`. ::
296296

297297
return PyLong_FromLong(sts);

‎Doc/howto/isolating-extensions.rst

Copy file name to clipboardExpand all lines: Doc/howto/isolating-extensions.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,14 +483,14 @@ to get the state::
483483
return NULL;
484484
}
485485

486-
``PyType_GetModuleByDef`` works by searching the
486+
:c:func:`!PyType_GetModuleByDef` works by searching the
487487
:term:`method resolution order` (i.e. all superclasses) for the first
488488
superclass that has a corresponding module.
489489

490490
.. note::
491491

492492
In very exotic cases (inheritance chains spanning multiple modules
493-
created from the same definition), ``PyType_GetModuleByDef`` might not
493+
created from the same definition), :c:func:`!PyType_GetModuleByDef` might not
494494
return the module of the true defining class. However, it will always
495495
return a module with the same definition, ensuring a compatible
496496
C memory layout.

‎Doc/whatsnew/3.11.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.11.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ New Features
22272227

22282228
(Contributed by Christian Heimes in :issue:`45459`.)
22292229

2230-
* Added the :c:data:`PyType_GetModuleByDef` function, used to get the module
2230+
* Added the :c:func:`PyType_GetModuleByDef` function, used to get the module
22312231
in which a method was defined, in cases where this information is not
22322232
available directly (via :c:type:`PyCMethod`).
22332233
(Contributed by Petr Viktorin in :issue:`46613`.)

‎Doc/whatsnew/3.9.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.9.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ New Features
12761276
* :pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate
12771277
a module with a class; :c:func:`PyType_GetModule` and
12781278
:c:func:`PyType_GetModuleState` to retrieve the module and its state; and
1279-
:c:data:`PyCMethod` and :c:macro:`METH_METHOD` to allow a method to
1279+
:c:type:`PyCMethod` and :c:macro:`METH_METHOD` to allow a method to
12801280
access the class it was defined in.
12811281
(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)
12821282

‎Misc/NEWS.d/3.10.0a2.rst

Copy file name to clipboardExpand all lines: Misc/NEWS.d/3.10.0a2.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,8 @@ Victor Stinner.
847847
.. section: C API
848848
849849
Fix potential crash in deallocating method objects when dynamically
850-
allocated `PyMethodDef`'s lifetime is managed through the ``self`` argument
851-
of a `PyCFunction`.
850+
allocated :c:type:`PyMethodDef`'s lifetime is managed through the ``self`` argument
851+
of a :c:type:`PyCFunction`.
852852

853853
..
854854

‎Misc/NEWS.d/3.12.0a1.rst

Copy file name to clipboardExpand all lines: Misc/NEWS.d/3.12.0a1.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5934,7 +5934,7 @@ not override :c:member:`~PyTypeObject.tp_call` now inherit the
59345934
.. nonce: aiRSgr
59355935
.. section: C API
59365936
5937-
Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
5937+
Creating :c:macro:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
59385938
bases is deprecated and is planned to be disabled in Python 3.14.
59395939

59405940
..

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.