]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (#140032)
authorMikhail Efimov <efimov.mikhail@gmail.com>
Mon, 13 Oct 2025 11:23:09 +0000 (14:23 +0300)
committerGitHub <noreply@github.com>
Mon, 13 Oct 2025 11:23:09 +0000 (13:23 +0200)
Doc/c-api/object.rst
Doc/c-api/typeobj.rst

index 78599e704b1317c565bec9a7e2a8e2c65db7fcdc..56857929a5a72ac2171d9499f656951abe903297 100644 (file)
@@ -600,7 +600,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 8bd3144f88aa71aec18c5aa6ff66d792cd239290..5b7cf0c45026a9aae2cfe0bce11c9dc06099e78b 100644 (file)
@@ -1704,7 +1704,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);