Commit b8460137 authored by Stefan Behnel's avatar Stefan Behnel

remove accidentally duplicated finaliser code from the coroutine deallocator...

remove accidentally duplicated finaliser code from the coroutine deallocator function as it must get executed earlier than that
parent 0880a7e8
...@@ -1407,26 +1407,6 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) { ...@@ -1407,26 +1407,6 @@ static void __Pyx_Coroutine_check_and_dealloc(PyObject *self) {
Py_XDECREF(msg);} Py_XDECREF(msg);}
#endif #endif
PyObject_GC_Track(self); PyObject_GC_Track(self);
#ifdef __Pyx_AsyncGen_USED
} else if (__Pyx_AsyncGen_CheckExact(self)) {
__pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
PyObject *finalizer = agen->ag_finalizer;
if (finalizer && !agen->ag_closed) {
/* Save the current exception, if any. */
PyObject *error_type, *error_value, *error_traceback, *res;
PyErr_Fetch(&error_type, &error_value, &error_traceback);
res = __Pyx_PyObject_CallOneArg(finalizer, self);
if (res == NULL) {
PyErr_WriteUnraisable(self);
} else {
Py_DECREF(res);
}
/* Restore the saved exception. */
PyErr_Restore(error_type, error_value, error_traceback);
return;
}
#endif
} }
__Pyx_Coroutine_dealloc(self); __Pyx_Coroutine_dealloc(self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment