mirror of
https://github.com/python/cpython.git
synced 2026-05-05 01:51:01 +00:00
[3.13] document Py_VISIT as a macro in the docs (GH-133688) (#134187)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
This commit is contained in:
parent
9c297690d5
commit
018ec634f6
1 changed files with 2 additions and 2 deletions
|
|
@ -180,9 +180,9 @@ provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse`
|
|||
must name its arguments exactly *visit* and *arg*:
|
||||
|
||||
|
||||
.. c:function:: void Py_VISIT(PyObject *o)
|
||||
.. c:macro:: Py_VISIT(o)
|
||||
|
||||
If *o* is not ``NULL``, call the *visit* callback, with arguments *o*
|
||||
If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, with arguments *o*
|
||||
and *arg*. If *visit* returns a non-zero value, then return it.
|
||||
Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers
|
||||
look like::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue