summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-17 17:56:44 (GMT)
committerGitHub <noreply@github.com>2020-03-17 17:56:44 (GMT)
commitdab8423d220243efabbbcafafc12d90145539b50 (patch)
treeea5292be67fbb841bf16c76099a4b51c0871afd3 /Python/pystate.c
parent514c469719f149e1722a91a9d0c63bf89dfefb2a (diff)
downloadcpython-dab8423d220243efabbbcafafc12d90145539b50.zip
cpython-dab8423d220243efabbbcafafc12d90145539b50.tar.gz
cpython-dab8423d220243efabbbcafafc12d90145539b50.tar.bz2
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.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index f92c2b4..77d4cc7 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);