mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +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
|
@ -11,6 +11,9 @@ extern "C" {
|
|||
/* Forward declarations */
|
||||
struct pyruntimestate;
|
||||
struct _ceval_runtime_state;
|
||||
struct _frame;
|
||||
|
||||
#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
|
||||
|
||||
PyAPI_FUNC(void) _Py_FinishPendingCalls(struct pyruntimestate *runtime);
|
||||
PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *);
|
||||
|
@ -34,6 +37,12 @@ PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
|
|||
/* Private function */
|
||||
void _PyEval_Fini(void);
|
||||
|
||||
static inline PyObject*
|
||||
_PyEval_EvalFrame(PyThreadState *tstate, struct _frame *f, int throwflag)
|
||||
{
|
||||
return tstate->interp->eval_frame(f, throwflag);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue