Skip to content

Commit 4ade772

Browse files
[3.12] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121310)
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (cherry picked from commit 4232976) Co-authored-by: da-woods <[email protected]>
1 parent e5a19b9 commit 4ade772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
15841584
weak references to the type object itself.
15851585

15861586
It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and
1587-
:c:member:`~PyTypeObject.tp_weaklist`.
1587+
:c:member:`~PyTypeObject.tp_weaklistoffset`.
15881588

15891589
**Inheritance:**
15901590

@@ -1596,7 +1596,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
15961596
**Default:**
15971597

15981598
If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the
1599-
:c:member:`~PyTypeObject.tp_dict` field, then
1599+
:c:member:`~PyTypeObject.tp_flags` field, then
16001600
:c:member:`~PyTypeObject.tp_weaklistoffset` will be set to a negative value,
16011601
to indicate that it is unsafe to use this field.
16021602

0 commit comments

Comments
 (0)