mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
document Py_VISIT
as a macro in the docs (#133688)
This commit is contained in:
parent
2cc99b3dd3
commit
bb32f3c698
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