Skip to content

Commit f5816da

Browse files
committed
Fix C Task impl
1 parent 6e385ac commit f5816da

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Modules/_asynciomodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,15 +2003,15 @@ _asyncio.Task.__init__
20032003
*
20042004
loop: object = None
20052005
name: object = None
2006-
context: object(c_default='NULL') = None
2006+
context: object = None
20072007
20082008
A coroutine wrapped in a Future.
20092009
[clinic start generated code]*/
20102010

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

20162016
{
20172017
if (future_init((FutureObj*)self, loop)) {
@@ -2030,7 +2030,7 @@ _asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop,
20302030
return -1;
20312031
}
20322032

2033-
if (context == NULL) {
2033+
if (context == Py_None) {
20342034
Py_XSETREF(self->task_context, PyContext_CopyCurrent());
20352035
if (self->task_context == NULL) {
20362036
return -1;

Modules/clinic/_asynciomodule.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)