2 /* Generator object interface */
10 struct _frame
; /* Avoid including frameobject.h */
14 /* The gi_ prefix is intended to remind of generator-iterator. */
16 /* Note: gi_frame can be NULL if the generator is "finished" */
17 struct _frame
*gi_frame
;
19 /* True if generator is being executed. */
22 /* The code object backing the generator */
25 /* List of weak reference. */
26 PyObject
*gi_weakreflist
;
29 PyAPI_DATA(PyTypeObject
) PyGen_Type
;
31 #define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
32 #define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)
34 PyAPI_FUNC(PyObject
*) PyGen_New(struct _frame
*);
35 PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject
*);
40 #endif /* !Py_GENOBJECT_H */