From dab8423d220243efabbbcafafc12d90145539b50 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 17 Mar 2020 18:56:44 +0100 Subject: bpo-39984: Add PyInterpreterState.ceval (GH-19047) subinterpreters: Move _PyRuntimeState.ceval.tracing_possible to PyInterpreterState.ceval.tracing_possible: each interpreter now has its own variable. Changes: * Add _ceval_state structure. * Add PyInterpreterState.ceval field. * _PyEval_EvalFrameDefault(): add ceval2 variable (struct _ceval_state*). * Rename _PyEval_Initialize() to _PyEval_InitRuntimeState(). * Add _PyEval_InitState(). * Don't export internal _Py_FinishPendingCalls() and _PyEval_FiniThreads() functions anymore. --- Python/pystate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index f92c2b4c5e..77d4cc7cf5 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -58,7 +58,7 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime) runtime->open_code_userdata = open_code_userdata; runtime->audit_hook_head = audit_hook_head; - _PyEval_Initialize(&runtime->ceval); + _PyEval_InitRuntimeState(&runtime->ceval); PyPreConfig_InitPythonConfig(&runtime->preconfig); @@ -213,6 +213,7 @@ PyInterpreterState_New(void) _PyRuntimeState *runtime = &_PyRuntime; interp->runtime = runtime; + _PyEval_InitState(&interp->ceval); _PyGC_InitState(&interp->gc); PyConfig_InitPythonConfig(&interp->config); -- cgit v1.2.1