|
1 | 1 | /* Type object implementation */ |
2 | 2 |
|
3 | 3 | #include "Python.h" |
| 4 | +#include "object.h" |
4 | 5 | #include "pycore_call.h" |
5 | 6 | #include "pycore_code.h" // CO_FAST_FREE |
6 | 7 | #include "pycore_regions.h" |
@@ -3334,7 +3335,7 @@ type_new_alloc(type_new_ctx *ctx) |
3334 | 3335 | // All heap types need GC, since we can create a reference cycle by storing |
3335 | 3336 | // an instance on one of its parents. |
3336 | 3337 | type->tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE | |
3337 | | - Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC); |
| 3338 | + Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_REGION_AWARE); |
3338 | 3339 |
|
3339 | 3340 | // Initialize essential fields |
3340 | 3341 | type->tp_as_async = &et->as_async; |
@@ -5357,6 +5358,7 @@ PyTypeObject PyType_Type = { |
5357 | 5358 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | |
5358 | 5359 | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS | |
5359 | 5360 | Py_TPFLAGS_HAVE_VECTORCALL | |
| 5361 | + Py_TPFLAGS_REGION_AWARE | |
5360 | 5362 | Py_TPFLAGS_ITEMS_AT_END, /* tp_flags */ |
5361 | 5363 | type_doc, /* tp_doc */ |
5362 | 5364 | (traverseproc)type_traverse, /* tp_traverse */ |
@@ -6567,7 +6569,8 @@ PyTypeObject PyBaseObject_Type = { |
6567 | 6569 | PyObject_GenericGetAttr, /* tp_getattro */ |
6568 | 6570 | PyObject_GenericSetAttr, /* tp_setattro */ |
6569 | 6571 | 0, /* tp_as_buffer */ |
6570 | | - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ |
| 6572 | + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | |
| 6573 | + Py_TPFLAGS_REGION_AWARE, /* tp_flags */ |
6571 | 6574 | object_doc, /* tp_doc */ |
6572 | 6575 | 0, /* tp_traverse */ |
6573 | 6576 | 0, /* tp_clear */ |
|
0 commit comments