[Python-checkins] [3.11] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) (GH-97778) (#97892)

ambv webhook-mailer at python.org
Wed Oct 5 11:21:37 EDT 2022


https://github.com/python/cpython/commit/5c8aa2e0f224179e5ee3086b295a735610e9e5c7
commit: 5c8aa2e0f224179e5ee3086b295a735610e9e5c7
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2022-10-05T08:21:32-07:00
summary:

[3.11] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeObject*`) (GH-97778) (#97892)

Co-authored-by: Ezio Melotti <ezio.melotti at gmail.com>
(cherry picked from commit c70c8b69762f720377adaf22f2e5ec6496a7be53)

Co-authored-by: Adam Turner <9087854+AA-Turner at users.noreply.github.com>

files:
M Doc/c-api/object.rst
M Doc/c-api/typehints.rst

diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index fb03366056b0..5a25a2b6c9d3 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -310,7 +310,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 88554a346c0d..4c1957a2a1db 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,)``.



More information about the Python-checkins mailing list