From 382d0411313718e9c17d43432c320df92c332ac1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 2 Jun 2016 11:35:59 -0700 Subject: [PATCH] note that Py_VISIT handles NULL (closes #27183) --- Doc/c-api/gcsupport.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index b0a2d5c08d..9438feaeb1 100644 --- a/Doc/c-api/gcsupport.rst +++ b/Doc/c-api/gcsupport.rst @@ -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) -- 2.50.1