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.)
1286
1286
:c:member: `~PyTypeObject.tp_weaklistoffset ` field is set in a superclass.
1287
1287
1288
1288
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
+
1289
1302
.. c :macro :: Py_TPFLAGS_ITEMS_AT_END
1290
1303
1291
1304
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.
550
550
*/
551
551
#define Py_TPFLAGS_MANAGED_DICT (1 << 4)
552
552
553
+ /* Type has dictionary or weakref pointers that are managed by VM and has
554
+ * to allocate space to store these.
555
+ */
553
556
#define Py_TPFLAGS_PREHEADER (Py_TPFLAGS_MANAGED_WEAKREF | Py_TPFLAGS_MANAGED_DICT)
554
557
555
558
/* 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