summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-26 19:29:23 (GMT)
committerGitHub <noreply@github.com>2023-07-26 19:29:23 (GMT)
commit6d5b6e71c87fca7c5c26f5dd8f325087962215cc (patch)
tree6e9dde6f6266287119c66e14dea3fe6898feab4d /Doc/c-api
parentaf61cb9c7837ff3c11da79e3ee1cab3fdd0ba4da (diff)
downloadcpython-6d5b6e71c87fca7c5c26f5dd8f325087962215cc.zip
cpython-6d5b6e71c87fca7c5c26f5dd8f325087962215cc.tar.gz
cpython-6d5b6e71c87fca7c5c26f5dd8f325087962215cc.tar.bz2
gh-107091: Fix some uses of :c:type: role (GH-107138)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/tuple.rst2
-rw-r--r--Doc/c-api/typeobj.rst20
2 files changed, 12 insertions, 10 deletions
diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst
index 3fe1062..2277a39 100644
--- a/Doc/c-api/tuple.rst
+++ b/Doc/c-api/tuple.rst
@@ -114,6 +114,8 @@ Tuple Objects
raises :exc:`MemoryError` or :exc:`SystemError`.
+.. _struct-sequence-objects:
+
Struct Sequence Objects
-----------------------
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index a070c41..2b21a34 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -163,9 +163,9 @@ Quick Reference
.. [#cols] Columns:
- **"O"**: set on :c:type:`PyBaseObject_Type`
+ **"O"**: set on :c:data:`PyBaseObject_Type`
- **"T"**: set on :c:type:`PyType_Type`
+ **"T"**: set on :c:data:`PyType_Type`
**"D"**: default (if slot is set to ``NULL``)
@@ -569,8 +569,8 @@ PyTypeObject Slots
Each slot has a section describing inheritance. If :c:func:`PyType_Ready`
may set a value when the field is set to ``NULL`` then there will also be
-a "Default" section. (Note that many fields set on :c:type:`PyBaseObject_Type`
-and :c:type:`PyType_Type` effectively act as defaults.)
+a "Default" section. (Note that many fields set on :c:data:`PyBaseObject_Type`
+and :c:data:`PyType_Type` effectively act as defaults.)
.. c:member:: const char* PyTypeObject.tp_name
@@ -964,7 +964,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
**Default:**
- :c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`.
+ :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`.
.. c:member:: setattrofunc PyTypeObject.tp_setattro
@@ -990,7 +990,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
**Default:**
- :c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`.
+ :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`.
.. c:member:: PyBufferProcs* PyTypeObject.tp_as_buffer
@@ -1031,7 +1031,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
**Default:**
- :c:type:`PyBaseObject_Type` uses
+ :c:data:`PyBaseObject_Type` uses
``Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE``.
**Bit Masks:**
@@ -1556,7 +1556,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
**Default:**
- :c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare`
+ :c:data:`PyBaseObject_Type` provides a :attr:`tp_richcompare`
implementation, which may be inherited. However, if only
:attr:`tp_hash` is defined, not even the inherited function is used
and instances of the type will not be able to participate in any
@@ -1878,7 +1878,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
:c:func:`PyType_GenericAlloc`, to force a standard heap
allocation strategy.
- For static subtypes, :c:type:`PyBaseObject_Type` uses
+ For static subtypes, :c:data:`PyBaseObject_Type` uses
:c:func:`PyType_GenericAlloc`. That is the recommended value
for all statically defined types.
@@ -1941,7 +1941,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
match :c:func:`PyType_GenericAlloc` and the value of the
:c:macro:`Py_TPFLAGS_HAVE_GC` flag bit.
- For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del.
+ For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`.
.. c:member:: inquiry PyTypeObject.tp_is_gc