note that Py_VISIT handles NULL (closes #27183)

This commit is contained in:
Benjamin Peterson 2016-06-02 11:35:59 -07:00
parent 0a5120e457
commit a49ccf2113

View file

@ -126,9 +126,10 @@ must name its arguments exactly *visit* and *arg*:
.. c:function:: void Py_VISIT(PyObject *o) .. c:function:: void Py_VISIT(PyObject *o)
Call the *visit* callback, with arguments *o* and *arg*. If *visit* returns If *o* is not *NULL*, call the *visit* callback, with arguments *o*
a non-zero value, then return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse` and *arg*. If *visit* returns a non-zero value, then return it.
handlers look like:: Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers
look like::
static int static int
my_traverse(Noddy *self, visitproc visit, void *arg) my_traverse(Noddy *self, visitproc visit, void *arg)