1.. highlightlang:: c
2
3.. _coro-objects:
4
5Coroutine Objects
6-----------------
7
8.. versionadded:: 3.5
9
10Coroutine objects are what functions declared with an ``async`` keyword
11return.
12
13
14.. c:type:: PyCoroObject
15
16   The C structure used for coroutine objects.
17
18
19.. c:var:: PyTypeObject PyCoro_Type
20
21   The type object corresponding to coroutine objects.
22
23
24.. c:function:: int PyCoro_CheckExact(PyObject *ob)
25
26   Return true if *ob*'s type is *PyCoro_Type*; *ob* must not be *NULL*.
27
28
29.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)
30
31   Create and return a new coroutine object based on the *frame* object,
32   with ``__name__`` and ``__qualname__`` set to *name* and *qualname*.
33   A reference to *frame* is stolen by this function.  The *frame* argument
34   must not be *NULL*.
35