aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-02-01 10:42:03 +0000
committerGitHub <noreply@github.com>2021-02-01 10:42:03 +0000
commit0332e569c12d3dc97171546c6dc10e42c27de34b (patch)
tree1ef4cc33b19c2c7f24c157ffdfa61250ea2c9787 /Include
parentbpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string... (diff)
downloadcpython-0332e569c12d3dc97171546c6dc10e42c27de34b.tar.gz
cpython-0332e569c12d3dc97171546c6dc10e42c27de34b.tar.bz2
cpython-0332e569c12d3dc97171546c6dc10e42c27de34b.zip
bpo-42990: Further refactoring of PyEval_ functions. (GH-24368)
* Further refactoring of PyEval_EvalCode and friends. Break into make-frame, and eval-frame parts. * Simplify function vector call using new _PyEval_Vector. * Remove unused internal functions: _PyEval_EvalCodeWithName and _PyEval_EvalCode. * Don't use legacy function PyEval_EvalCodeEx.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/frameobject.h4
-rw-r--r--Include/eval.h10
-rw-r--r--Include/internal/pycore_ceval.h11
3 files changed, 7 insertions, 18 deletions
diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h
index f162e2465f3..5a19c006d91 100644
--- a/Include/cpython/frameobject.h
+++ b/Include/cpython/frameobject.h
@@ -71,8 +71,8 @@ PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
PyObject *, PyObject *);
/* only internal use */
-PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *,
- PyObject *, PyObject *, PyObject *);
+PyFrameObject*
+_PyFrame_New_NoTrack(PyThreadState *, PyFrameConstructor *, PyObject *);
/* The rest of the interface is specific for frame objects */
diff --git a/Include/eval.h b/Include/eval.h
index 2c1c2d0549a..eda28df8f65 100644
--- a/Include/eval.h
+++ b/Include/eval.h
@@ -18,16 +18,6 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
PyObject *kwdefs, PyObject *closure);
#ifndef Py_LIMITED_API
-PyAPI_FUNC(PyObject *) _PyEval_EvalCodeWithName(
- PyObject *co,
- PyObject *globals, PyObject *locals,
- PyObject *const *args, Py_ssize_t argcount,
- PyObject *const *kwnames, PyObject *const *kwargs,
- Py_ssize_t kwcount, int kwstep,
- PyObject *const *defs, Py_ssize_t defcount,
- PyObject *kwdefs, PyObject *closure,
- PyObject *name, PyObject *qualname);
-
PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args);
#endif
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index a9da8b8f450..0491d48a789 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -40,12 +40,11 @@ _PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag)
return tstate->interp->eval_frame(tstate, f, throwflag);
}
-extern PyObject *_PyEval_EvalCode(
- PyThreadState *tstate,
- PyFrameConstructor *desc, PyObject *locals,
- PyObject *const *args, Py_ssize_t argcount,
- PyObject *const *kwnames, PyObject *const *kwargs,
- Py_ssize_t kwcount, int kwstep);
+extern PyObject *
+_PyEval_Vector(PyThreadState *tstate,
+ PyFrameConstructor *desc, PyObject *locals,
+ PyObject* const* args, size_t argcount,
+ PyObject *kwnames);
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
extern int _PyEval_ThreadsInitialized(PyInterpreterState *interp);