@@ -29,11 +29,12 @@ extern PyTypeObject _PyExc_MemoryError;
29
29
/* The static initializers defined here should only be used
30
30
in the runtime init code (in pystate.c and pylifecycle.c). */
31
31
32
- #define _PyRuntimeState_INIT (runtime ) \
32
+ #define _PyRuntimeState_INIT (runtime , debug_cookie ) \
33
33
{ \
34
34
.debug_offsets = { \
35
- .cookie = "xdebugpy" , \
35
+ .cookie = debug_cookie , \
36
36
.version = PY_VERSION_HEX, \
37
+ .free_threaded = _Py_Debug_Free_Threaded, \
37
38
.runtime_state = { \
38
39
.size = sizeof(_PyRuntimeState), \
39
40
.finalizing = offsetof(_PyRuntimeState, _finalizing), \
@@ -49,6 +50,8 @@ extern PyTypeObject _PyExc_MemoryError;
49
50
.sysdict = offsetof(PyInterpreterState, sysdict), \
50
51
.builtins = offsetof(PyInterpreterState, builtins), \
51
52
.ceval_gil = offsetof(PyInterpreterState, ceval.gil), \
53
+ .gil_runtime_state = offsetof(PyInterpreterState, _gil), \
54
+ .gil_runtime_state_enabled = _Py_Debug_gilruntimestate_enabled, \
52
55
.gil_runtime_state_locked = offsetof(PyInterpreterState, _gil.locked), \
53
56
.gil_runtime_state_holder = offsetof(PyInterpreterState, _gil.last_holder), \
54
57
}, \
@@ -90,10 +93,37 @@ extern PyTypeObject _PyExc_MemoryError;
90
93
.type_object = { \
91
94
.size = sizeof(PyTypeObject), \
92
95
.tp_name = offsetof(PyTypeObject, tp_name), \
96
+ .tp_repr = offsetof(PyTypeObject, tp_repr), \
97
+ .tp_flags = offsetof(PyTypeObject, tp_flags), \
93
98
}, \
94
99
.tuple_object = { \
95
100
.size = sizeof(PyTupleObject), \
96
101
.ob_item = offsetof(PyTupleObject, ob_item), \
102
+ .ob_size = offsetof(PyTupleObject, ob_base.ob_size), \
103
+ }, \
104
+ .list_object = { \
105
+ .size = sizeof(PyListObject), \
106
+ .ob_item = offsetof(PyListObject, ob_item), \
107
+ .ob_size = offsetof(PyListObject, ob_base.ob_size), \
108
+ }, \
109
+ .dict_object = { \
110
+ .size = sizeof(PyDictObject), \
111
+ .ma_keys = offsetof(PyDictObject, ma_keys), \
112
+ .ma_values = offsetof(PyDictObject, ma_values), \
113
+ }, \
114
+ .float_object = { \
115
+ .size = sizeof(PyFloatObject), \
116
+ .ob_fval = offsetof(PyFloatObject, ob_fval), \
117
+ }, \
118
+ .long_object = { \
119
+ .size = sizeof(PyLongObject), \
120
+ .lv_tag = offsetof(_PyLongValue, lv_tag), \
121
+ .ob_digit = offsetof(_PyLongValue, ob_digit), \
122
+ }, \
123
+ .bytes_object = { \
124
+ .size = sizeof(PyBytesObject), \
125
+ .ob_size = offsetof(PyBytesObject, ob_base.ob_size), \
126
+ .ob_sval = offsetof(PyBytesObject, ob_sval), \
97
127
}, \
98
128
.unicode_object = { \
99
129
.size = sizeof(PyUnicodeObject), \
0 commit comments