Skip to content

Commit

Permalink
Fix C Task impl
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Mar 14, 2022
1 parent 6e385ac commit f5816da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2003,15 +2003,15 @@ _asyncio.Task.__init__
*
loop: object = None
name: object = None
context: object(c_default='NULL') = None
context: object = None
A coroutine wrapped in a Future.
[clinic start generated code]*/

static int
_asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop,
PyObject *name, PyObject *context)
/*[clinic end generated code: output=49ac96fe33d0e5c7 input=f45c94aefa9c235a]*/
/*[clinic end generated code: output=49ac96fe33d0e5c7 input=924522490c8ce825]*/

{
if (future_init((FutureObj*)self, loop)) {
Expand All @@ -2030,7 +2030,7 @@ _asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop,
return -1;
}

if (context == NULL) {
if (context == Py_None) {
Py_XSETREF(self->task_context, PyContext_CopyCurrent());
if (self->task_context == NULL) {
return -1;
Expand Down
4 changes: 2 additions & 2 deletions Modules/clinic/_asynciomodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5816da

Please sign in to comment.