]> granicus.if.org Git - python/commitdiff
note that Py_VISIT handles NULL (closes #27183)
authorBenjamin Peterson <benjamin@python.org>
Thu, 2 Jun 2016 18:35:59 +0000 (11:35 -0700)
committerBenjamin Peterson <benjamin@python.org>
Thu, 2 Jun 2016 18:35:59 +0000 (11:35 -0700)
Doc/c-api/gcsupport.rst

index 9f6ad852260945c6ff5d0f6c5a6f0e45bb2606f5..f5e0d7ec9c79c368f90e22b20785e5e31cfa528c 100644 (file)
@@ -126,9 +126,10 @@ must name its arguments exactly *visit* and *arg*:
 
 .. c:function:: void Py_VISIT(PyObject *o)
 
-   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::
+   If *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::
 
       static int
       my_traverse(Noddy *self, visitproc visit, void *arg)