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