]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] 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:30:27 +0000 (13:30 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Oct 2025 11:30:27 +0000 (11:30 +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 241fbd3a4866c75f45170b8ee42f5d6b4cbf91f1..1e39505588f6fdf9f6a8cd33d524c76ab73a2724 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 060d6f60174b41af41d5d67779dbbf21988c726e..d86b3ed730a3d1d597175f0ae03e09fcbd644c8d 100644 (file)
@@ -1691,7 +1691,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);