[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 52996aaa78)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-10-13 13:29:41 +02:00 committed by GitHub
parent 08a2b2de79
commit 278384150a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View 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

View 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);