]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (#112237)
authorda-woods <dw-git@d-woods.co.uk>
Wed, 3 Jul 2024 08:05:02 +0000 (09:05 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Jul 2024 08:05:02 +0000 (13:35 +0530)
Doc/c-api/typeobj.rst

index c9ef076c78c66a86c1be27fe40230fbe38aacf8e..0091e084308245285698576b83645da035ac398b 100644 (file)
@@ -1592,7 +1592,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
    weak references to the type object itself.
 
    It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and
-   :c:member:`~PyTypeObject.tp_weaklist`.
+   :c:member:`~PyTypeObject.tp_weaklistoffset`.
 
    **Inheritance:**
 
@@ -1604,7 +1604,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
    **Default:**
 
    If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the
-   :c:member:`~PyTypeObject.tp_dict` field, then
+   :c:member:`~PyTypeObject.tp_flags` field, then
    :c:member:`~PyTypeObject.tp_weaklistoffset` will be set to a negative value,
    to indicate that it is unsafe to use this field.