summaryrefslogtreecommitdiffstats
path: root/Objects/genobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-14 11:20:46 (GMT)
committerGitHub <noreply@github.com>2019-11-14 11:20:46 (GMT)
commitb9e681261cd5ce6db0a79461c58d7cc52cfa4902 (patch)
treef7ae0bd04938d34e7af64b9c7a02f2d0318aa558 /Objects/genobject.c
parent3ccdd9b180f9a3f29c8ddc8ad1b331fe8df26519 (diff)
downloadcpython-b9e681261cd5ce6db0a79461c58d7cc52cfa4902.zip
cpython-b9e681261cd5ce6db0a79461c58d7cc52cfa4902.tar.gz
cpython-b9e681261cd5ce6db0a79461c58d7cc52cfa4902.tar.bz2
bpo-38644: Add _PyEval_EvalFrame() with tstate (GH-17131)
Add _PyEval_EvalFrame() static inline function to get eval_frame from tstate->interp.
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index b72248c..98eb9c3 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1,6 +1,7 @@
/* Generator object implementation */
#include "Python.h"
+#include "pycore_ceval.h" /* _PyEval_EvalFrame() */
#include "pycore_object.h"
#include "pycore_pystate.h"
#include "frameobject.h"
@@ -219,7 +220,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing)
gen->gi_running = 1;
gen->gi_exc_state.previous_item = tstate->exc_info;
tstate->exc_info = &gen->gi_exc_state;
- result = PyEval_EvalFrameEx(f, exc);
+ result = _PyEval_EvalFrame(tstate, f, exc);
tstate->exc_info = gen->gi_exc_state.previous_item;
gen->gi_exc_state.previous_item = NULL;
gen->gi_running = 0;