Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: Modules/clinic/_asynciomodule.c.h

Issue 29271: Task.current_task(None) returns unexpected result
Patch Set: Created 3 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/_asynciomodule.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*[clinic input] 1 /*[clinic input]
2 preserve 2 preserve
3 [clinic start generated code]*/ 3 [clinic start generated code]*/
4 4
5 PyDoc_STRVAR(_asyncio_Future___init____doc__, 5 PyDoc_STRVAR(_asyncio_Future___init____doc__,
6 "Future(*, loop=None)\n" 6 "Future(*, loop=None)\n"
7 "--\n" 7 "--\n"
8 "\n" 8 "\n"
9 "This class is *almost* compatible with concurrent.futures.Future.\n" 9 "This class is *almost* compatible with concurrent.futures.Future.\n"
10 "\n" 10 "\n"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 static PyObject * 272 static PyObject *
273 _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop); 273 _asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop);
274 274
275 static PyObject * 275 static PyObject *
276 _asyncio_Task_current_task(PyTypeObject *type, PyObject **args, Py_ssize_t nargs , PyObject *kwnames) 276 _asyncio_Task_current_task(PyTypeObject *type, PyObject **args, Py_ssize_t nargs , PyObject *kwnames)
277 { 277 {
278 PyObject *return_value = NULL; 278 PyObject *return_value = NULL;
279 static const char * const _keywords[] = {"loop", NULL}; 279 static const char * const _keywords[] = {"loop", NULL};
280 static _PyArg_Parser _parser = {"|O:current_task", _keywords, 0}; 280 static _PyArg_Parser _parser = {"|O:current_task", _keywords, 0};
281 PyObject *loop = NULL; 281 PyObject *loop = Py_None;
282 282
283 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 283 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
284 &loop)) { 284 &loop)) {
285 goto exit; 285 goto exit;
286 } 286 }
287 return_value = _asyncio_Task_current_task_impl(type, loop); 287 return_value = _asyncio_Task_current_task_impl(type, loop);
288 288
289 exit: 289 exit:
290 return return_value; 290 return return_value;
291 } 291 }
(...skipping 11 matching lines...) Expand all
303 303
304 static PyObject * 304 static PyObject *
305 _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop); 305 _asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop);
306 306
307 static PyObject * 307 static PyObject *
308 _asyncio_Task_all_tasks(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, P yObject *kwnames) 308 _asyncio_Task_all_tasks(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, P yObject *kwnames)
309 { 309 {
310 PyObject *return_value = NULL; 310 PyObject *return_value = NULL;
311 static const char * const _keywords[] = {"loop", NULL}; 311 static const char * const _keywords[] = {"loop", NULL};
312 static _PyArg_Parser _parser = {"|O:all_tasks", _keywords, 0}; 312 static _PyArg_Parser _parser = {"|O:all_tasks", _keywords, 0};
313 PyObject *loop = NULL; 313 PyObject *loop = Py_None;
314 314
315 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 315 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
316 &loop)) { 316 &loop)) {
317 goto exit; 317 goto exit;
318 } 318 }
319 return_value = _asyncio_Task_all_tasks_impl(type, loop); 319 return_value = _asyncio_Task_all_tasks_impl(type, loop);
320 320
321 exit: 321 exit:
322 return return_value; 322 return return_value;
323 } 323 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 511 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
512 &fut)) { 512 &fut)) {
513 goto exit; 513 goto exit;
514 } 514 }
515 return_value = _asyncio_Task__wakeup_impl(self, fut); 515 return_value = _asyncio_Task__wakeup_impl(self, fut);
516 516
517 exit: 517 exit:
518 return return_value; 518 return return_value;
519 } 519 }
520 /*[clinic end generated code: output=8f036321bb083066 input=a9049054013a1b77]*/ 520 /*[clinic end generated code: output=40ca6c9da517da73 input=a9049054013a1b77]*/
OLDNEW
« no previous file with comments | « Modules/_asynciomodule.c ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+