… | |
… | |
139 | x_cb (struct event *ev, int revents) |
139 | x_cb (struct event *ev, int revents) |
140 | { |
140 | { |
141 | revents &= EV_READ | EV_WRITE | EV_TIMEOUT | EV_SIGNAL; |
141 | revents &= EV_READ | EV_WRITE | EV_TIMEOUT | EV_SIGNAL; |
142 | |
142 | |
143 | ev->ev_res = revents; |
143 | ev->ev_res = revents; |
144 | ev->ev_callback (ev->ev_fd, revents, ev->ev_arg); |
144 | ev->ev_callback (ev->ev_fd, (short)revents, ev->ev_arg); |
145 | } |
145 | } |
146 | |
146 | |
147 | static void |
147 | static void |
148 | x_cb_sig (EV_P_ struct ev_signal *w, int revents) |
148 | x_cb_sig (EV_P_ struct ev_signal *w, int revents) |
149 | { |
149 | { |
… | |
… | |
356 | static void |
356 | static void |
357 | x_once_cb (int revents, void *arg) |
357 | x_once_cb (int revents, void *arg) |
358 | { |
358 | { |
359 | struct x_once *once = (struct x_once *)arg; |
359 | struct x_once *once = (struct x_once *)arg; |
360 | |
360 | |
361 | once->cb (once->fd, revents, once->arg); |
361 | once->cb (once->fd, (short)revents, once->arg); |
362 | free (once); |
362 | free (once); |
363 | } |
363 | } |
364 | |
364 | |
365 | int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) |
365 | int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) |
366 | { |
366 | { |