Patch #966493: Cleanup generator/eval_frame exposure.

This commit is contained in:
Martin v. Löwis 2004-06-27 15:43:12 +00:00
parent 634893d1a3
commit 8d97e33bb7
5 changed files with 13 additions and 18 deletions

View file

@ -99,6 +99,7 @@
#include "sliceobject.h"
#include "cellobject.h"
#include "iterobject.h"
#include "genobject.h"
#include "descrobject.h"
#include "weakrefobject.h"

View file

@ -64,7 +64,7 @@ PyAPI_FUNC(char *) PyEval_GetFuncName(PyObject *);
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;

View file

@ -7,11 +7,13 @@
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;
@ -25,7 +27,7 @@ PyAPI_DATA(PyTypeObject) PyGen_Type;
#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
}