diff options
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 09b83cdeb1f..9ebd9fdea60 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -20,6 +20,7 @@ #include "pycore_pystate.h" #include "pycore_runtime_init.h" // _PyRuntimeState_INIT #include "pycore_stackref.h" // Py_STACKREF_DEBUG +#include "pycore_time.h" // _PyTime_Init() #include "pycore_obmalloc.h" // _PyMem_obmalloc_state_on_heap() #include "pycore_uniqueid.h" // _PyObject_FinalizePerThreadRefcounts() @@ -461,6 +462,11 @@ _PyRuntimeState_Init(_PyRuntimeState *runtime) assert(!runtime->_initialized); } + PyStatus status = _PyTime_Init(&runtime->time); + if (_PyStatus_EXCEPTION(status)) { + return status; + } + if (gilstate_tss_init(runtime) != 0) { _PyRuntimeState_Fini(runtime); return _PyStatus_NO_MEMORY(); |