PyAPI_FUNC(char *) PyEval_GetFuncDesc(PyObject *);
PyAPI_FUNC(PyObject *) PyEval_GetCallStats(PyObject *);
-PyAPI_FUNC(PyObject *) PyEval_EvaluateFrame(PyObject *);
+PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *);
/* this used to be handled on a per-thread basis - now just two globals */
PyAPI_DATA(volatile int) _Py_Ticker;
extern "C" {
#endif
+struct _frame; /* Avoid including frameobject.h */
+
typedef struct {
PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
- PyFrameObject *gi_frame;
+ struct _frame *gi_frame;
/* True if generator is being executed. */
int gi_running;
#define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
#define PyGen_CheckExact(op) ((op)->ob_type == &PyGen_Type)
-PyAPI_FUNC(PyObject *) PyGen_New(PyFrameObject *);
+PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
#ifdef __cplusplus
}
#include "compile.h"
#include "frameobject.h"
-#include "genobject.h"
#include "eval.h"
#include "opcode.h"
#include "structmember.h"
typedef PyObject *(*callproc)(PyObject *, PyObject *, PyObject *);
/* Forward declarations */
-static PyObject *eval_frame(PyFrameObject *);
#ifdef WITH_TSC
static PyObject *call_function(PyObject ***, int, uint64*, uint64*);
#else
/* Interpreter main loop */
-static PyObject *
-eval_frame(PyFrameObject *f)
+PyObject *
+PyEval_EvalFrame(PyFrameObject *f)
{
#ifdef DXPAIRS
int lastopcode = 0;
}
/* this is gonna seem *real weird*, but if you put some other code between
- eval_frame() and PyEval_EvalCodeEx() you will need to adjust the test in
- the if statement in Misc/gdbinit:ppystack */
+ PyEval_EvalFrame() and PyEval_EvalCodeEx() you will need to adjust
+ the test in the if statement in Misc/gdbinit:ppystack */
PyObject *
PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
return PyGen_New(f);
}
- retval = eval_frame(f);
+ retval = PyEval_EvalFrame(f);
fail: /* Jump here from prelude on failure */
}
}
-PyObject *
-PyEval_EvaluateFrame(PyObject *fo)
-{
- return eval_frame((PyFrameObject *)fo);
-}
-
#define EXT_POP(STACK_POINTER) (*--(STACK_POINTER))
static void
Py_INCREF(*stack);
fastlocals[i] = *stack++;
}
- retval = eval_frame(f);
+ retval = PyEval_EvalFrame(f);
assert(tstate != NULL);
++tstate->recursion_depth;
Py_DECREF(f);