mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Statically initialize _PyRuntimeState fields. (gh-30588)
https://bugs.python.org/issue45953
This commit is contained in:
parent
bc02eac9d2
commit
b8ddf7e794
2 changed files with 11 additions and 10 deletions
|
@ -111,17 +111,7 @@ init_runtime(_PyRuntimeState *runtime,
|
|||
|
||||
PyPreConfig_InitPythonConfig(&runtime->preconfig);
|
||||
|
||||
runtime->gilstate.check_enabled = 1;
|
||||
|
||||
/* A TSS key must be initialized with Py_tss_NEEDS_INIT
|
||||
in accordance with the specification. */
|
||||
Py_tss_t initial = Py_tss_NEEDS_INIT;
|
||||
runtime->gilstate.autoTSSkey = initial;
|
||||
|
||||
runtime->interpreters.mutex = interpreters_mutex;
|
||||
// This prevents interpreters from getting created
|
||||
// until _PyInterpreterState_Enable() is called.
|
||||
runtime->interpreters.next_id = -1;
|
||||
|
||||
runtime->xidregistry.mutex = xidregistry_mutex;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue