Commit b13f6705 authored by Denis Bilenko's avatar Denis Bilenko

remove unnecessary decref/incref from callbacks.c

parent 5e104e88
......@@ -99,7 +99,6 @@ static void gevent_callback(struct ev_loop *_loop, void *c_watcher, int revents)
gevent_handle_error(watcher->loop, (PyObject*)watcher);
goto end;
}
Py_DECREF(GEVENT_CORE_EVENTS);
PyTuple_SET_ITEM(args, 0, py_events);
}
else {
......@@ -126,7 +125,6 @@ static void gevent_callback(struct ev_loop *_loop, void *c_watcher, int revents)
end:
if (py_events) {
Py_DECREF(py_events);
Py_INCREF(GEVENT_CORE_EVENTS);
PyTuple_SET_ITEM(args, 0, GEVENT_CORE_EVENTS);
}
Py_DECREF((PyObject*)watcher);
......
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