diff options
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r-- | Modules/_asynciomodule.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 267faac..978a1fd 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -810,9 +810,7 @@ FutureObj_traverse(FutureObj *fut, visitproc visit, void *arg) Py_VISIT(fut->dict); _PyErr_StackItem *exc_state = &fut->fut_cancelled_exc_state; - Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); - Py_VISIT(exc_state->exc_traceback); return 0; } @@ -1376,10 +1374,6 @@ _asyncio_Future__make_cancelled_error_impl(FutureObj *self) PyException_SetContext(exc, Py_NewRef(exc_state->exc_value)); _PyErr_ClearExcState(exc_state); } - else { - assert(exc_state->exc_type == NULL); - assert(exc_state->exc_traceback == NULL); - } return exc; } @@ -2706,13 +2700,13 @@ task_step_impl(TaskObj *task, PyObject *exc) PyErr_NormalizeException(&et, &ev, &tb); if (tb != NULL) { PyException_SetTraceback(ev, tb); + Py_DECREF(tb); } + Py_XDECREF(et); FutureObj *fut = (FutureObj*)task; _PyErr_StackItem *exc_state = &fut->fut_cancelled_exc_state; - exc_state->exc_type = et; exc_state->exc_value = ev; - exc_state->exc_traceback = tb; return future_cancel(fut, NULL); } |