Spaces:
Running
Running
| /* Generator object interface */ | |
| extern "C" { | |
| /* _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 **); | |
| PyObject *_PyGen_yf(PyGenObject *); | |
| PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self); | |
| typedef struct { | |
| _PyGenObject_HEAD(cr) | |
| PyObject *cr_origin; | |
| } PyCoroObject; | |
| PyAPI_DATA(PyTypeObject) PyCoro_Type; | |
| PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type; | |
| PyObject *_PyCoro_GetAwaitableIter(PyObject *o); | |
| PyAPI_FUNC(PyObject *) PyCoro_New(PyFrameObject *, | |
| PyObject *name, PyObject *qualname); | |
| /* Asynchronous Generators */ | |
| typedef struct { | |
| _PyGenObject_HEAD(ag) | |
| PyObject *ag_finalizer; | |
| /* Flag is set to 1 when hooks set up by sys.set_asyncgen_hooks | |
| were called on the generator, to avoid calling them more | |
| than once. */ | |
| int ag_hooks_inited; | |
| /* Flag is set to 1 when aclose() is called for the first time, or | |
| when a StopAsyncIteration exception is raised. */ | |
| int ag_closed; | |
| int ag_running_async; | |
| } 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); | |
| PyObject *_PyAsyncGenValueWrapperNew(PyObject *); | |
| } | |