Skip to content

Commit de0a656

Browse files
[3.10] gh-93738: Documentation C syntax (:c:type:PyTypeObject* -> :c:expr:PyTypeObject*) (GH-97778) (#97890)
Co-authored-by: Ezio Melotti <[email protected]> (cherry picked from commit c70c8b6) Co-authored-by: Adam Turner <[email protected]>
1 parent 9aed6bd commit de0a656

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Object Protocol
292292
is equivalent to the Python expression ``type(o)``. This function increments the
293293
reference count of the return value. There's really no reason to use this
294294
function instead of the :c:func:`Py_TYPE()` function, which returns a
295-
pointer of type :c:type:`PyTypeObject*`, except when the incremented reference
295+
pointer of type :c:expr:`PyTypeObject*`, except when the incremented reference
296296
count is needed.
297297
298298

Doc/c-api/typehints.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
1515
Equivalent to calling the Python class
1616
:class:`types.GenericAlias`. The *origin* and *args* arguments set the
1717
``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively.
18-
*origin* should be a :c:type:`PyTypeObject*`, and *args* can be a
18+
*origin* should be a :c:expr:`PyTypeObject*`, and *args* can be a
1919
:c:expr:`PyTupleObject*` or any ``PyObject*``. If *args* passed is
2020
not a tuple, a 1-tuple is automatically constructed and ``__args__`` is set
2121
to ``(args,)``.

0 commit comments

Comments
 (0)