https://github.com/python/cpython/commit/76957eb8ccd98b4647bfc655d145aadd05c977e0 commit: 76957eb8ccd98b4647bfc655d145aadd05c977e0 branch: 3.14 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: kumaraditya303 <kumaradi...@python.org> date: 2025-05-18T16:34:19Z summary:
[3.14] document `Py_VISIT` as a macro in the docs (GH-133688) (#134186) document `Py_VISIT` as a macro in the docs (GH-133688) (cherry picked from commit bb32f3c698f5192dddd2d2f33c7c0a3d05afc223) Co-authored-by: da-woods <dw-...@d-woods.co.uk> files: M Doc/c-api/gcsupport.rst diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index d1f0982b818931..3e23605778f05a 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:: _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com