gh-107073: fix relevant typo in PyObject_ClearManagedDict (#140032)

This commit is contained in:
Mikhail Efimov 2025-10-13 14:23:09 +03:00 committed by GitHub
parent a00655b877
commit 52996aaa78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View 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

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