summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-05 15:21:18 (GMT)
committerGitHub <noreply@github.com>2022-10-05 15:21:18 (GMT)
commitde0a656d5b52c6ad54a04ec825380c4dc422e736 (patch)
tree9cc7fa1a92533893ced36e75896b82f8678872af
parent9aed6bdb2048ee12a3fc019dffc25d0d80237bbd (diff)
downloadcpython-de0a656d5b52c6ad54a04ec825380c4dc422e736.zip
cpython-de0a656d5b52c6ad54a04ec825380c4dc422e736.tar.gz
cpython-de0a656d5b52c6ad54a04ec825380c4dc422e736.tar.bz2
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) (GH-97778) (#97890)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit c70c8b69762f720377adaf22f2e5ec6496a7be53) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
-rw-r--r--Doc/c-api/object.rst2
-rw-r--r--Doc/c-api/typehints.rst2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 07a625b..eef42ca 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -292,7 +292,7 @@ Object Protocol
is equivalent to the Python expression ``type(o)``. This function increments the
reference count of the return value. There's really no reason to use this
function instead of the :c:func:`Py_TYPE()` function, which returns a
- pointer of type :c:type:`PyTypeObject*`, except when the incremented reference
+ pointer of type :c:expr:`PyTypeObject*`, except when the incremented reference
count is needed.
diff --git a/Doc/c-api/typehints.rst b/Doc/c-api/typehints.rst
index 79f29ac..3606800 100644
--- a/Doc/c-api/typehints.rst
+++ b/Doc/c-api/typehints.rst
@@ -15,7 +15,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
Equivalent to calling the Python class
:class:`types.GenericAlias`. The *origin* and *args* arguments set the
``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively.
- *origin* should be a :c:type:`PyTypeObject*`, and *args* can be a
+ *origin* should be a :c:expr:`PyTypeObject*`, and *args* can be a
:c:expr:`PyTupleObject*` or any ``PyObject*``. If *args* passed is
not a tuple, a 1-tuple is automatically constructed and ``__args__`` is set
to ``(args,)``.