diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-06-02 18:35:59 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-06-02 18:35:59 (GMT) |
commit | a49ccf2113085f74f4ce6a84c19f2aaaff9f5978 (patch) | |
tree | eeae74f47e6ce7d3e3967970e4c642a06d3edc72 /Doc | |
parent | 0a5120e457107bc4288a60cf81b8fe0911958fc2 (diff) | |
download | cpython-a49ccf2113085f74f4ce6a84c19f2aaaff9f5978.zip cpython-a49ccf2113085f74f4ce6a84c19f2aaaff9f5978.tar.gz cpython-a49ccf2113085f74f4ce6a84c19f2aaaff9f5978.tar.bz2 |
note that Py_VISIT handles NULL (closes #27183)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/gcsupport.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index 9f6ad85..f5e0d7e 100644 --- a/Doc/c-api/gcsupport.rst +++ b/Doc/c-api/gcsupport.rst @@ -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) |