diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2019-05-30 15:30:09 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-30 15:30:09 (GMT) |
commit | 98ef92002ec289bf8086b0ef3d4f96c2589f4e68 (patch) | |
tree | 0c3420f69cef6e0c306af7508fdd06415b39a853 /Modules/clinic | |
parent | 25ee0c3bf10820496448e2886069f9c2794be7ac (diff) | |
download | cpython-98ef92002ec289bf8086b0ef3d4f96c2589f4e68.zip cpython-98ef92002ec289bf8086b0ef3d4f96c2589f4e68.tar.gz cpython-98ef92002ec289bf8086b0ef3d4f96c2589f4e68.tar.bz2 |
bpo-36999: Add asyncio.Task.get_coro() (GH-13680)
https://bugs.python.org/issue36999
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/_asynciomodule.c.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 87669f7..b9daee6 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -569,6 +569,23 @@ PyDoc_STRVAR(_asyncio_Task_set_exception__doc__, #define _ASYNCIO_TASK_SET_EXCEPTION_METHODDEF \ {"set_exception", (PyCFunction)_asyncio_Task_set_exception, METH_O, _asyncio_Task_set_exception__doc__}, +PyDoc_STRVAR(_asyncio_Task_get_coro__doc__, +"get_coro($self, /)\n" +"--\n" +"\n"); + +#define _ASYNCIO_TASK_GET_CORO_METHODDEF \ + {"get_coro", (PyCFunction)_asyncio_Task_get_coro, METH_NOARGS, _asyncio_Task_get_coro__doc__}, + +static PyObject * +_asyncio_Task_get_coro_impl(TaskObj *self); + +static PyObject * +_asyncio_Task_get_coro(TaskObj *self, PyObject *Py_UNUSED(ignored)) +{ + return _asyncio_Task_get_coro_impl(self); +} + PyDoc_STRVAR(_asyncio_Task_get_name__doc__, "get_name($self, /)\n" "--\n" @@ -815,4 +832,4 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=e3b02d96da56e80c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=51c50219f6a0863a input=a9049054013a1b77]*/ |