From a3e49295b1873e66b0fa193ccdc5f3e603073c3d Mon Sep 17 00:00:00 2001 From: isatyamks Date: Wed, 12 Feb 2025 21:42:12 +0530 Subject: [PATCH 1/2] Fix documentation to correct references to Py_TPFLAGS_MANAGED_DICT in typeobj.rst --- Doc/c-api/typeobj.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 69c518d8e64cbc..3a9834003468b3 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1605,7 +1605,7 @@ and :c:data:`PyType_Type` effectively act as defaults.) Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that is the list head for weak references to the type object itself. - It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and + It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:member:`~PyTypeObject.tp_weaklistoffset`. **Inheritance:** @@ -1830,7 +1830,7 @@ and :c:data:`PyType_Type` effectively act as defaults.) dictionary, so it is may be more efficient to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object. - It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and + It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:member:`~PyTypeObject.tp_dictoffset`. **Inheritance:** From 760683f693a83ec8ef2fde543365224535d7bc28 Mon Sep 17 00:00:00 2001 From: isatyamks Date: Wed, 12 Feb 2025 22:53:42 +0530 Subject: [PATCH 2/2] Fix documentation to correct reference to Py_TPFLAGS_MANAGED_WEAKREF in typeobj.rst --- Doc/c-api/typeobj.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 3a9834003468b3..b41e5767e59c5f 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1605,7 +1605,7 @@ and :c:data:`PyType_Type` effectively act as defaults.) Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that is the list head for weak references to the type object itself. - It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and + It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and :c:member:`~PyTypeObject.tp_weaklistoffset`. **Inheritance:**