--- EV/EV.xs 2010/07/08 00:45:03 1.141 +++ EV/EV.xs 2010/10/21 15:13:42 1.142 @@ -366,8 +366,7 @@ const_iv (EV_, READ) const_iv (EV_, WRITE) const_iv (EV_, IO) - const_iv (EV_, TIMEOUT) /* deprecated */ - const_iv (EV_, TIMER) + const_iv (EV_, TIMEOUT) const_iv (EV_, PERIODIC) const_iv (EV_, SIGNAL) const_iv (EV_, CHILD) @@ -381,13 +380,12 @@ const_iv (EV_, CUSTOM) const_iv (EV_, ERROR) - const_iv (EV, LOOP_NONBLOCK) - const_iv (EV, LOOP_ONESHOT) - - const_iv (EV, UNLOOP_CANCEL) - const_iv (EV, UNLOOP_ONE) - const_iv (EV, UNLOOP_ALL) + const_iv (EV, RUN_NOWAIT) + const_iv (EV, RUN_ONCE) + const_iv (EV, BREAK_CANCEL) + const_iv (EV, BREAK_ONE) + const_iv (EV, BREAK_ALL) const_iv (EV, BACKEND_SELECT) const_iv (EV, BACKEND_POLL) const_iv (EV, BACKEND_EPOLL) @@ -404,6 +402,16 @@ const_iv (EV_, VERSION_MAJOR) const_iv (EV_, VERSION_MINOR) +#if EV_COMPAT3 + const_iv (EV_, TIMER) + + const_iv (EV, LOOP_NONBLOCK) + const_iv (EV, LOOP_ONESHOT) + + const_iv (EV, UNLOOP_CANCEL) + const_iv (EV, UNLOOP_ONE) + const_iv (EV, UNLOOP_ALL) +#endif }; for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) @@ -450,7 +458,7 @@ evapi.suspend = ev_suspend; evapi.resume = ev_resume; evapi.backend = ev_backend; - evapi.unloop = ev_unloop; + evapi.break_ = ev_break; evapi.invoke_pending = ev_invoke_pending; evapi.pending_count = ev_pending_count; evapi.verify = ev_verify; @@ -458,7 +466,7 @@ evapi.set_invoke_pending_cb= ev_set_invoke_pending_cb; evapi.ref = ev_ref; evapi.unref = ev_unref; - evapi.loop = ev_loop; + evapi.run = ev_run; evapi.once = ev_once; evapi.io_start = ev_io_start; evapi.io_stop = ev_io_stop; @@ -552,12 +560,18 @@ C_ARGS: evapi.default_loop void ev_verify () + ALIAS: + loop_verify = 1 C_ARGS: evapi.default_loop unsigned int ev_iteration () + ALIAS: + loop_count = 1 C_ARGS: evapi.default_loop unsigned int ev_depth () + ALIAS: + loop_depth = 1 C_ARGS: evapi.default_loop void ev_set_io_collect_interval (NV interval) @@ -566,10 +580,14 @@ void ev_set_timeout_collect_interval (NV interval) C_ARGS: evapi.default_loop, interval -void ev_loop (int flags = 0) +void ev_run (int flags = 0) + ALIAS: + loop = 1 C_ARGS: evapi.default_loop, flags -void ev_unloop (int how = EVUNLOOP_ONE) +void ev_break (int how = EVBREAK_ONE) + ALIAS: + unloop = 1 C_ARGS: evapi.default_loop, how void ev_feed_fd_event (int fd, int revents = EV_NONE) @@ -1292,8 +1310,6 @@ void ev_loop_fork (struct ev_loop *loop) -void ev_verify (struct ev_loop *loop) - NV ev_now (struct ev_loop *loop) void ev_now_update (struct ev_loop *loop) @@ -1308,13 +1324,25 @@ unsigned int ev_backend (struct ev_loop *loop) +void ev_verify (struct ev_loop *loop) + ALIAS: + loop_verify = 1 + unsigned int ev_iteration (struct ev_loop *loop) + ALIAS: + loop_count = 1 unsigned int ev_depth (struct ev_loop *loop) + ALIAS: + loop_depth = 1 -void ev_loop (struct ev_loop *loop, int flags = 0) +void ev_run (struct ev_loop *loop, int flags = 0) + ALIAS: + loop = 1 -void ev_unloop (struct ev_loop *loop, int how = 1) +void ev_break (struct ev_loop *loop, int how = 1) + ALIAS: + unloop = 1 void ev_feed_fd_event (struct ev_loop *loop, int fd, int revents = EV_NONE)