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 | 382d0411313718e9c17d43432c320df92c332ac1 (patch) | |
tree | 8b4dba953cc04bcf7987b36f10d4119eee82f51e /Doc | |
parent | 8d496add74530767cad3aa8b5b371b9a7f0b8498 (diff) | |
download | cpython-382d0411313718e9c17d43432c320df92c332ac1.zip cpython-382d0411313718e9c17d43432c320df92c332ac1.tar.gz cpython-382d0411313718e9c17d43432c320df92c332ac1.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 b0a2d5c..9438fea 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) |