Spaces:
Sleeping
Sleeping
/* Generator object interface */ | |
extern "C" { | |
/* --- Generators --------------------------------------------------------- */ | |
/* _PyGenObject_HEAD defines the initial segment of generator | |
and coroutine objects. */ | |
typedef struct { | |
/* The gi_ prefix is intended to remind of generator-iterator. */ | |
_PyGenObject_HEAD(gi) | |
} PyGenObject; | |
PyAPI_DATA(PyTypeObject) PyGen_Type; | |
PyAPI_FUNC(PyObject *) PyGen_New(PyFrameObject *); | |
PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *, | |
PyObject *name, PyObject *qualname); | |
PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *); | |
PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **); | |
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self); | |
/* --- PyCoroObject ------------------------------------------------------- */ | |
typedef struct { | |
_PyGenObject_HEAD(cr) | |
} PyCoroObject; | |
PyAPI_DATA(PyTypeObject) PyCoro_Type; | |
PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type; | |
PyAPI_FUNC(PyObject *) PyCoro_New(PyFrameObject *, | |
PyObject *name, PyObject *qualname); | |
/* --- Asynchronous Generators -------------------------------------------- */ | |
typedef struct { | |
_PyGenObject_HEAD(ag) | |
} PyAsyncGenObject; | |
PyAPI_DATA(PyTypeObject) PyAsyncGen_Type; | |
PyAPI_DATA(PyTypeObject) _PyAsyncGenASend_Type; | |
PyAPI_DATA(PyTypeObject) _PyAsyncGenWrappedValue_Type; | |
PyAPI_DATA(PyTypeObject) _PyAsyncGenAThrow_Type; | |
PyAPI_FUNC(PyObject *) PyAsyncGen_New(PyFrameObject *, | |
PyObject *name, PyObject *qualname); | |
} | |