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 d2cdf08

Browse filesBrowse files
[3.11] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107121)
(cherry picked from commit 08a228d)
1 parent c51f766 commit d2cdf08
Copy full SHA for d2cdf08

File tree

Expand file treeCollapse file tree

10 files changed

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

10 files changed

+19
-19
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
@@ -149,7 +149,7 @@ Type Objects
149149
``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses
150150
are not necessarily defined in the same module as their superclass.
151151
See :c:type:`PyCMethod` to get the class that defines the method.
152-
See :c:func:`PyType_GetModuleByDef` for cases when ``PyCMethod`` cannot
152+
See :c:func:`PyType_GetModuleByDef` for cases when :c:type:`!PyCMethod` cannot
153153
be used.
154154
155155
.. 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
@@ -2169,8 +2169,8 @@ Number Object Structures
21692169

21702170
.. note::
21712171

2172-
The :c:data:`nb_reserved` field should always be ``NULL``. It
2173-
was previously called :c:data:`nb_long`, and was renamed in
2172+
The :c:member:`~PyNumberMethods.nb_reserved` field should always be ``NULL``. It
2173+
was previously called :c:member:`!nb_long`, and was renamed in
21742174
Python 3.0.1.
21752175

21762176
.. 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
@@ -235,10 +235,10 @@ Note that the Python name for the exception object is :exc:`spam.error`. The
235235
being :exc:`Exception` (unless another class is passed in instead of ``NULL``),
236236
described in :ref:`bltin-exceptions`.
237237

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

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

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

290290
sts = system(command);
291291

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

295295
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

0 commit comments

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