From: da-woods Date: Sat, 12 Apr 2025 15:36:02 +0000 (+0100) Subject: Docs: Fix specifications of `gcvisitobjects_t` (#132433) X-Git-Tag: v3.14.0b1~514 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e5798e37255e921beae2aaa8329d5c48a2ef230;p=thirdparty%2FPython%2Fcpython.git Docs: Fix specifications of `gcvisitobjects_t` (#132433) `gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0. --- diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst index 621da3eb0699..d1f0982b8189 100644 --- a/Doc/c-api/gcsupport.rst +++ b/Doc/c-api/gcsupport.rst @@ -277,7 +277,7 @@ the garbage collector. Type of the visitor function to be passed to :c:func:`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to ``PyUnstable_GC_VisitObjects``. - Return ``0`` to continue iteration, return ``1`` to stop iteration. Other return + Return ``1`` to continue iteration, return ``0`` to stop iteration. Other return values are reserved for now so behavior on returning anything else is undefined. .. versionadded:: 3.12