Skip to content

Commit

Permalink
[3.11] gh-93738: Documentation C syntax (:c:type:PyTypeObject* -> :…
Browse files Browse the repository at this point in the history
…c:expr:`PyTypeObject*`) (GH-97778) (#97892)

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

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
  • Loading branch information
2 people authored and pablogsal committed Oct 22, 2022
1 parent 6ff98f7 commit 2af31cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/typehints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ 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
:c:type:`PyTupleObject*` or any ``PyObject*``. If *args* passed is
*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,)``.
Minimal checking is done for the arguments, so the function will succeed even
Expand Down

0 comments on commit 2af31cf

Please sign in to comment.