Skip to content

Commit 4232976

Browse files
authored
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (#112237)
1 parent f49c83a commit 4232976

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
@@ -1592,7 +1592,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
15921592
weak references to the type object itself.
15931593

15941594
It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and
1595-
:c:member:`~PyTypeObject.tp_weaklist`.
1595+
:c:member:`~PyTypeObject.tp_weaklistoffset`.
15961596

15971597
**Inheritance:**
15981598

@@ -1604,7 +1604,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
16041604
**Default:**
16051605

16061606
If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the
1607-
:c:member:`~PyTypeObject.tp_dict` field, then
1607+
:c:member:`~PyTypeObject.tp_flags` field, then
16081608
:c:member:`~PyTypeObject.tp_weaklistoffset` will be set to a negative value,
16091609
to indicate that it is unsafe to use this field.
16101610

0 commit comments

Comments
 (0)