diff options
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 352fb83d55e..8c4e6e5107f 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -8,6 +8,7 @@ #include "pycore_pyerrors.h" // _PyErr_NoMemory() #include "pycore_pystate.h" // _PyThreadState_GET() #include "pycore_tuple.h" // _PyTuple_FromArray() +#include "pycore_ceval.h" // _PyEval_Vector() _Py_IDENTIFIER(__builtins__); _Py_IDENTIFIER(__dict__); @@ -219,9 +220,9 @@ builtin___build_class__(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py_TYPE(ns)->tp_name); goto error; } - cell = PyEval_EvalCodeEx(PyFunction_GET_CODE(func), PyFunction_GET_GLOBALS(func), ns, - NULL, 0, NULL, 0, NULL, 0, NULL, - PyFunction_GET_CLOSURE(func)); + PyFrameConstructor *f = PyFunction_AS_FRAME_CONSTRUCTOR(func); + PyThreadState *tstate = PyThreadState_GET(); + cell = _PyEval_Vector(tstate, f, ns, NULL, 0, NULL); if (cell != NULL) { if (bases != orig_bases) { if (PyMapping_SetItemString(ns, "__orig_bases__", orig_bases) < 0) { |