From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 13 Oct 2025 11:29:41 +0000 (+0200) Subject: [3.13] gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032) (... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=278384150a2eb58a66c47dc148b2ec11b45fb8d0;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032) (#140034) gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032) (cherry picked from commit 52996aaa78706e0f2a70953feaf97b474eb438e7) Co-authored-by: Mikhail Efimov --- diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 8bb392af01fc..a07e6cfea98b 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -585,7 +585,7 @@ Object Protocol Clear the managed dictionary of *obj*. - This function must only be called in a traverse function of the type which + This function must only be called in a clear function of the type which has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set. .. versionadded:: 3.13 diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 0aa155687187..a692a65218bd 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1533,7 +1533,7 @@ and :c:data:`PyType_Type` effectively act as defaults.) :c:func:`Py_CLEAR` macro performs the operations in a safe order. If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the - :c:member:`~PyTypeObject.tp_flags` field, the traverse function must call + :c:member:`~PyTypeObject.tp_flags` field, the clear function must call :c:func:`PyObject_ClearManagedDict` like this:: PyObject_ClearManagedDict((PyObject*)self);