mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
GH-95245: Move weakreflist into the pre-header. (GH-95996)
This commit is contained in:
parent
829aab8592
commit
5a8c15819c
6 changed files with 105 additions and 20 deletions
|
@ -360,12 +360,18 @@ given type object has a specified feature.
|
|||
/* Track types initialized using _PyStaticType_InitBuiltin(). */
|
||||
#define _Py_TPFLAGS_STATIC_BUILTIN (1 << 1)
|
||||
|
||||
/* Placement of weakref pointers are managed by the VM, not by the type.
|
||||
* The VM will automatically set tp_weaklistoffset.
|
||||
*/
|
||||
#define Py_TPFLAGS_MANAGED_WEAKREF (1 << 3)
|
||||
|
||||
/* Placement of dict (and values) pointers are managed by the VM, not by the type.
|
||||
* The VM will automatically set tp_dictoffset. Should not be used for variable sized
|
||||
* classes, such as classes that extend tuple.
|
||||
* The VM will automatically set tp_dictoffset.
|
||||
*/
|
||||
#define Py_TPFLAGS_MANAGED_DICT (1 << 4)
|
||||
|
||||
#define Py_TPFLAGS_PREHEADER (Py_TPFLAGS_MANAGED_WEAKREF | Py_TPFLAGS_MANAGED_DICT)
|
||||
|
||||
/* Set if instances of the type object are treated as sequences for pattern matching */
|
||||
#define Py_TPFLAGS_SEQUENCE (1 << 5)
|
||||
/* Set if instances of the type object are treated as mappings for pattern matching */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue