Skip to content

Commit 3608747

Browse files
Fix wording
1 parent f710627 commit 3608747

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12601260
This bit indicates that instances of the class have a :attr:`~object.__dict__`
12611261
attribute, and that the space for the dictionary is managed by the VM.
12621262

1263-
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set.
1263+
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set.
12641264

12651265
The type traverse function must call :c:func:`PyObject_VisitManagedDict`
12661266
and its clear function must call :c:func:`PyObject_ClearManagedDict`.
@@ -1278,7 +1278,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12781278
This bit indicates that instances of the class should be weakly
12791279
referenceable.
12801280

1281-
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set.
1281+
If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set.
12821282

12831283
.. versionadded:: 3.12
12841284

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ Limited C API changes
789789
---------------------
790790

791791
* If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`
792-
flags are set then :c:macro:`Py_TPFLAGS_HAVE_GC` should be set too.
792+
flags are set then :c:macro:`Py_TPFLAGS_HAVE_GC` must be set too.
793793
(Contributed by Sergey Miryanov in :gh:`134786`)
794794

795795

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Force to use :c:macro:`Py_TPFLAGS_HAVE_GC` if
2-
:c:macro:`Py_TPFLAGS_MANAGED_DICT` or :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`
3-
used.
1+
If :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`
2+
are used, then :c:macro:`Py_TPFLAGS_HAVE_GC` must be used as well.

0 commit comments

Comments
 (0)