mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-38644: Add _PyEval_EvalFrame() with tstate (GH-17131)
Add _PyEval_EvalFrame() static inline function to get eval_frame from tstate->interp.
This commit is contained in:
parent
3ccdd9b180
commit
b9e681261c
4 changed files with 20 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_ceval.h" /* _PyEval_EvalFrame() */
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pystate.h"
|
||||
|
|
@ -303,7 +304,7 @@ function_code_fastcall(PyCodeObject *co, PyObject *const *args, Py_ssize_t nargs
|
|||
Py_INCREF(*args);
|
||||
fastlocals[i] = *args++;
|
||||
}
|
||||
PyObject *result = PyEval_EvalFrameEx(f, 0);
|
||||
PyObject *result = _PyEval_EvalFrame(tstate, f, 0);
|
||||
|
||||
if (Py_REFCNT(f) > 1) {
|
||||
Py_DECREF(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue