]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] document `Py_VISIT` as a macro in the docs (GH-133688) (#134187)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 18 May 2025 16:36:04 +0000 (18:36 +0200)
committerGitHub <noreply@github.com>
Sun, 18 May 2025 16:36:04 +0000 (16:36 +0000)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698f5192dddd2d2f33c7c0a3d05afc223)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Doc/c-api/gcsupport.rst

index d1f0982b8189311215cac0cd4e400d89f5473211..3e23605778f05a73d56efc3c22757e3be0510209 100644 (file)
@@ -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::