]> 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 b0a2d5c08dddc37cca94843479f6593d75d1a6b2..9438feaeb18af73de21dc252f28d4034e1addb4b 100644 (file)
@@ -137,9 +137,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)