File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ extern "C" {
17
17
18
18
#define _PyRuntimeState_INIT \
19
19
{ \
20
+ .gilstate = { \
21
+ .check_enabled = 1, \
22
+ /* A TSS key must be initialized with Py_tss_NEEDS_INIT \
23
+ in accordance with the specification. */ \
24
+ .autoTSSkey = Py_tss_NEEDS_INIT, \
25
+ }, \
26
+ .interpreters = { \
27
+ /* This prevents interpreters from getting created \
28
+ until _PyInterpreterState_Enable() is called. */ \
29
+ .next_id = -1, \
30
+ }, \
20
31
.global_objects = _Py_global_objects_INIT, \
21
32
._main_interpreter = _PyInterpreterState_INIT, \
22
33
}
Original file line number Diff line number Diff line change @@ -111,17 +111,7 @@ init_runtime(_PyRuntimeState *runtime,
111
111
112
112
PyPreConfig_InitPythonConfig (& runtime -> preconfig );
113
113
114
- runtime -> gilstate .check_enabled = 1 ;
115
-
116
- /* A TSS key must be initialized with Py_tss_NEEDS_INIT
117
- in accordance with the specification. */
118
- Py_tss_t initial = Py_tss_NEEDS_INIT ;
119
- runtime -> gilstate .autoTSSkey = initial ;
120
-
121
114
runtime -> interpreters .mutex = interpreters_mutex ;
122
- // This prevents interpreters from getting created
123
- // until _PyInterpreterState_Enable() is called.
124
- runtime -> interpreters .next_id = -1 ;
125
115
126
116
runtime -> xidregistry .mutex = xidregistry_mutex ;
127
117
You can’t perform that action at this time.
0 commit comments