From: da-woods Date: Sun, 18 May 2025 16:28:43 +0000 (+0100) Subject: document `Py_VISIT` as a macro in the docs (#133688) X-Git-Tag: v3.15.0a1~1677 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb32f3c698f5192dddd2d2f33c7c0a3d05afc223;p=thirdparty%2FPython%2Fcpython.git document `Py_VISIT` as a macro in the docs (#133688) --- diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index d1f0982b8189..3e23605778f0 100644 --- a/Doc/c-api/gcsupport.rst +++ b/Doc/c-api/gcsupport.rst @@ -180,9 +180,9 @@ provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse` must name its arguments exactly *visit* and *arg*: -.. c:function:: void Py_VISIT(PyObject *o) +.. c:macro:: Py_VISIT(o) - If *o* is not ``NULL``, call the *visit* callback, with arguments *o* + If the :c:expr:`PyObject *` *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::