Commit 0ee61b32 authored by Eddi Linder's avatar Eddi Linder

Add o cffi the revents replacing code

parent 90361d25
......@@ -295,6 +295,8 @@ libev.vfd_free = lambda fd: None
@ffi.callback("int(void* handle, int revents)")
def _python_callback(handle, revents):
watcher = ffi.from_handle(handle)
if len(watcher.args) > 0 and watcher.args[0] == GEVENT_CORE_EVENTS:
watcher.args = (revents, ) + watcher.args[1:]
try:
watcher.callback(*watcher.args)
except:
......
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