summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
authorroot <root>2007-11-04 23:14:11 +0000
committerroot <root>2007-11-04 23:14:11 +0000
commit22b2a449105d7604f715c1afafeb4fe5ac473f1b (patch)
treeb18e0643b0b285e16de1ac4641e5aecdc59c1bec /ev.h
parentfbe9562600fa8735c078401aa604b49a5426b0e2 (diff)
- have to re-check potentially closed fds regularly for epoll. this hurts
badly :( - still more than twice as fats as libevent. - many minor fixes
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ev.h b/ev.h
index ecca856..1b33bf2 100644
--- a/ev.h
+++ b/ev.h
@@ -268,7 +268,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
((struct ev_watcher *)(ev))->active = \
((struct ev_watcher *)(ev))->pending = \
((struct ev_watcher *)(ev))->priority = 0; \
- ((struct ev_watcher *)(ev))->cb = (cb_); \
+ (ev)->cb = (cb_); \
} while (0)
#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_); } while (0)
@@ -293,7 +293,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
#define ev_is_active(ev) (0 + ((struct ev_watcher *)(ev))->active) /* ro, true when the watcher has been started */
#define ev_priority(ev) ((struct ev_watcher *)(ev))->priority /* rw */
-#define ev_cb(ev) ((struct ev_watcher *)(ev))->cb /* rw */
+#define ev_cb(ev) (ev)->cb /* rw */
#define ev_set_priority(ev,pri) ev_priority (ev) = (pri)
#define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)