]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> :c:expr:`PyTypeOb...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 5 Oct 2022 15:21:18 +0000 (08:21 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Oct 2022 15:21:18 +0000 (08:21 -0700)
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>
Doc/c-api/object.rst
Doc/c-api/typehints.rst

index 07a625bac02fc4df11e9cfbcefd1835949e416dc..eef42ca1326d5e7f73c7c8795a293646baa81629 100644 (file)
@@ -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.
 
 
index 79f29acc2e1e62ccc1efa8b8f53806db80e3e8e8..3606800054880da5753c22f0eda99568ecb74a7c 100644 (file)
@@ -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,)``.