diff options
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 32902aa..de8595c 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -4,8 +4,9 @@ #include "Python-ast.h" #undef Yield /* undefine macro conflicting with <winbase.h> */ -#include "pycore_coreconfig.h" +#include "pycore_ceval.h" #include "pycore_context.h" +#include "pycore_coreconfig.h" #include "pycore_fileutils.h" #include "pycore_hamt.h" #include "pycore_pathconfig.h" @@ -527,7 +528,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime, another running thread (see issue #9901). Instead we destroy the previously created GIL here, which ensures that we can call Py_Initialize / Py_FinalizeEx multiple times. */ - _PyEval_FiniThreads(); + _PyEval_FiniThreads(&runtime->ceval); /* Auto-thread-state API */ _PyGILState_Init(runtime, interp, tstate); @@ -1135,10 +1136,10 @@ Py_FinalizeEx(void) wait_for_thread_shutdown(); // Make any remaining pending calls. - _Py_FinishPendingCalls(); + _Py_FinishPendingCalls(runtime); /* Get current thread state and interpreter pointer */ - PyThreadState *tstate = _PyThreadState_GET(); + PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime); PyInterpreterState *interp = tstate->interp; /* The interpreter is still entirely intact at this point, and the |