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" {
1717
1818#define _PyRuntimeState_INIT \
1919 { \
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+ }, \
2031 .global_objects = _Py_global_objects_INIT, \
2132 ._main_interpreter = _PyInterpreterState_INIT, \
2233 }
Original file line number Diff line number Diff line change @@ -111,17 +111,7 @@ init_runtime(_PyRuntimeState *runtime,
111111
112112 PyPreConfig_InitPythonConfig (& runtime -> preconfig );
113113
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-
121114 runtime -> interpreters .mutex = interpreters_mutex ;
122- // This prevents interpreters from getting created
123- // until _PyInterpreterState_Enable() is called.
124- runtime -> interpreters .next_id = -1 ;
125115
126116 runtime -> xidregistry .mutex = xidregistry_mutex ;
127117
You can’t perform that action at this time.
0 commit comments