summaryrefslogtreecommitdiff
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-12 23:18:39 +0100
committerGitHub <noreply@github.com>2020-03-12 23:18:39 +0100
commit0b72b23fb0c130279f65f3bcd23521acf4a98c88 (patch)
tree2e2bbdef31294861783eeea4da94a02b8715f4c9 /Include/internal
parentc846ef004d79ee8e9645d3e5e8b3b0cb97b5013f (diff)
downloadcpython-git-0b72b23fb0c130279f65f3bcd23521acf4a98c88.tar.gz
bpo-38500: Add _PyInterpreterState_SetEvalFrameFunc() (GH-17340)
PyInterpreterState.eval_frame function now requires a tstate (Python thread state) parameter. Add private functions to the C API to get and set the frame evaluation function: * Add tstate parameter to _PyFrameEvalFunction function type. * Add _PyInterpreterState_GetEvalFrameFunc() and _PyInterpreterState_SetEvalFrameFunc() functions. * Add tstate parameter to _PyEval_EvalFrameDefault().
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_ceval.h2
-rw-r--r--Include/internal/pycore_pystate.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 70ce0ee5f7..23d80916fd 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -40,7 +40,7 @@ void _PyEval_Fini(void);
static inline PyObject*
_PyEval_EvalFrame(PyThreadState *tstate, struct _frame *f, int throwflag)
{
- return tstate->interp->eval_frame(f, throwflag);
+ return tstate->interp->eval_frame(tstate, f, throwflag);
}
extern PyObject *_PyEval_EvalCode(
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index b5f5095472..0a83546362 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -54,8 +54,6 @@ struct _ceval_runtime_state {
/* interpreter state */
-typedef PyObject* (*_PyFrameEvalFunction)(struct _frame *, int);
-
#define _PY_NSMALLPOSINTS 257
#define _PY_NSMALLNEGINTS 5