mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
PEP 0492 -- Coroutines with async and await syntax. Issue #24017.
This commit is contained in:
parent
4e6bf4b3da
commit
7544508f02
72 changed files with 9261 additions and 5739 deletions
|
@ -38,6 +38,12 @@ PyAPI_DATA(PyTypeObject) PyGen_Type;
|
|||
#define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
|
||||
#define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)
|
||||
|
||||
#define PyGen_CheckCoroutineExact(op) (PyGen_CheckExact(op) && \
|
||||
(((PyCodeObject*) \
|
||||
((PyGenObject*)op)->gi_code) \
|
||||
->co_flags & (CO_ITERABLE_COROUTINE | \
|
||||
CO_COROUTINE)))
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
|
||||
PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(struct _frame *,
|
||||
PyObject *name, PyObject *qualname);
|
||||
|
@ -46,6 +52,7 @@ PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
|
|||
PyObject *_PyGen_Send(PyGenObject *, PyObject *);
|
||||
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
|
||||
|
||||
PyObject *_PyGen_GetAwaitableIter(PyObject *o);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue