]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 13 Oct 2025 11:29:41 +0000 (13:29 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Oct 2025 11:29:41 +0000 (11:29 +0000)
gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032)
(cherry picked from commit 52996aaa78706e0f2a70953feaf97b474eb438e7)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Doc/c-api/object.rst
Doc/c-api/typeobj.rst

index 8bb392af01fcd2dd172e52810e15d21d7ba99ede..a07e6cfea98b11fdcd31c9d9d6827740602797a0 100644 (file)
@@ -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
index 0aa155687187decef729d165262ac22a3766085e..a692a65218bd21657fa1b6310ed46bf72893d9ae 100644 (file)
@@ -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);