File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1286,6 +1286,19 @@ and :c:data:`PyType_Type` effectively act as defaults.)
12861286 :c:member: `~PyTypeObject.tp_weaklistoffset ` field is set in a superclass.
12871287
12881288
1289+ .. c :macro :: Py_TPFLAGS_PREHEADER
1290+
1291+ These bits indicate that the VM will manage some fields by storing them
1292+ before the object. Currently, this macro is equivalent to
1293+ :c:expr: `Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF `.
1294+
1295+ This macro value relies on the implementation of the VM, so its value is not
1296+ stable and may change in a future version. Prefer using individual
1297+ flags instead.
1298+
1299+ .. versionadded :: 3.12
1300+
1301+
12891302 .. c :macro :: Py_TPFLAGS_ITEMS_AT_END
12901303
12911304 Only usable with variable-size types, i.e. ones with non-zero
Original file line number Diff line number Diff line change @@ -550,6 +550,9 @@ given type object has a specified feature.
550550 */
551551#define Py_TPFLAGS_MANAGED_DICT (1 << 4)
552552
553+ /* Type has dictionary or weakref pointers that are managed by VM and has
554+ * to allocate space to store these.
555+ */
553556#define Py_TPFLAGS_PREHEADER (Py_TPFLAGS_MANAGED_WEAKREF | Py_TPFLAGS_MANAGED_DICT)
554557
555558/* Set if instances of the type object are treated as sequences for pattern matching */
You can’t perform that action at this time.
0 commit comments