Commit 3195b00d authored by Denis Bilenko's avatar Denis Bilenko

core.event: pass (event, evtyoe) to callback instead of (event, fd, evtype)

fd is available as event.fd
parent a48ceb12
......@@ -108,7 +108,7 @@ EV_PERSIST = 0x10
cdef void __event_handler(int fd, short evtype, void *arg) with gil:
cdef event ev = <event>arg
try:
ev._callback(ev, fd, evtype)
ev._callback(ev, evtype)
except:
traceback.print_exc()
try:
......
......@@ -227,7 +227,7 @@ class DispatchExit(Exception):
pass
def _wait_helper(ev, fd, evtype):
def _wait_helper(ev, evtype):
current, timeout_exc = ev.arg
if evtype & core.EV_TIMEOUT:
current.throw(timeout_exc)
......
......@@ -18,7 +18,7 @@ def select(read_list, write_list, error_list, t=None):
assert hub.greenlet is not current, 'do not call blocking functions from the mainloop'
allevents = []
def callback(ev, fd, evtype):
def callback(ev, evtype):
if evtype & core.EV_READ:
current.switch(([ev.arg], [], []))
elif evtype & core.EV_WRITE:
......
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