Commit 60c7bcf9 authored by Denis Bilenko's avatar Denis Bilenko

core.ppyx: enable check watchers

parent 8458d36b
......@@ -8,6 +8,7 @@
DEFINE_CALLBACK(signal, Signal); \
DEFINE_CALLBACK(idle, Idle); \
DEFINE_CALLBACK(prepare, Prepare); \
DEFINE_CALLBACK(check, Check); \
DEFINE_CALLBACK(fork, Fork); \
DEFINE_CALLBACK(async, Async); \
DEFINE_CALLBACK(stat, Stat);
......
......@@ -31,6 +31,7 @@ cdef extern from "callbacks.h":
void gevent_callback_signal(libev.ev_loop, void*, int)
void gevent_callback_idle(libev.ev_loop, void*, int)
void gevent_callback_prepare(libev.ev_loop, void*, int)
void gevent_callback_check(libev.ev_loop, void*, int)
void gevent_callback_fork(libev.ev_loop, void*, int)
void gevent_callback_async(libev.ev_loop, void*, int)
void gevent_callback_child(libev.ev_loop, void*, int)
......@@ -473,6 +474,9 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
def prepare(self, ref=True, priority=None):
return prepare(self, ref, priority)
def check(self, ref=True, priority=None):
return check(self, ref, priority)
def fork(self, ref=True, priority=None):
return fork(self, ref, priority)
......@@ -949,6 +953,13 @@ cdef public class prepare(watcher) [object PyGeventPrepareObject, type PyGeventP
INIT(prepare,,)
cdef public class check(watcher) [object PyGeventCheckObject, type PyGeventCheck_Type]:
WATCHER(check)
INIT(check,,)
cdef public class fork(watcher) [object PyGeventForkObject, type PyGeventFork_Type]:
WATCHER(fork)
......
......@@ -103,6 +103,9 @@ cdef extern from "libev.h":
struct ev_prepare:
pass
struct ev_check:
pass
struct ev_fork:
pass
......@@ -159,6 +162,10 @@ cdef extern from "libev.h":
void ev_prepare_start(ev_loop*, ev_prepare*)
void ev_prepare_stop(ev_loop*, ev_prepare*)
void ev_check_init(ev_check*, void* callback)
void ev_check_start(ev_loop*, ev_check*)
void ev_check_stop(ev_loop*, ev_check*)
void ev_fork_init(ev_fork*, void* callback)
void ev_fork_start(ev_loop*, ev_fork*)
void ev_fork_stop(ev_loop*, ev_fork*)
......
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