diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-07-12 23:40:30 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-07-12 23:41:07 -0700 |
commit | c3b9f8c4582882cd1f768b0727eca75475bb4f94 (patch) | |
tree | 5b4a1c693fd5b7416f1d5a75862e633502e77ca7 /python/gevent/libev/callbacks.h | |
parent | fe9fe8257740529f5880693992e4eeca35c7ea3e (diff) | |
download | yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.tar.lz yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.tar.xz yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.zip |
track embedded python distribution
Diffstat (limited to 'python/gevent/libev/callbacks.h')
-rw-r--r-- | python/gevent/libev/callbacks.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/python/gevent/libev/callbacks.h b/python/gevent/libev/callbacks.h new file mode 100644 index 0000000..669ea9e --- /dev/null +++ b/python/gevent/libev/callbacks.h @@ -0,0 +1,43 @@ +#define DEFINE_CALLBACK(WATCHER_LC, WATCHER_TYPE) \ + static void gevent_callback_##WATCHER_LC(struct ev_loop *, void *, int); + + +#define DEFINE_CALLBACKS0 \ + DEFINE_CALLBACK(io, IO); \ + DEFINE_CALLBACK(timer, Timer); \ + 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); + + +#ifndef _WIN32 + +#define DEFINE_CALLBACKS \ + DEFINE_CALLBACKS0 \ + DEFINE_CALLBACK(child, Child) + +#else + +#define DEFINE_CALLBACKS DEFINE_CALLBACKS0 + +#endif + + +DEFINE_CALLBACKS + + +static void gevent_run_callbacks(struct ev_loop *, void *, int); +struct PyGeventLoopObject; +static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context); +struct PyGeventCallbackObject; +static void gevent_call(struct PyGeventLoopObject* loop, struct PyGeventCallbackObject* cb); + +#if defined(_WIN32) +static void gevent_periodic_signal_check(struct ev_loop *, void *, int); +#endif + +static void gevent_noop(struct ev_loop *_loop, void *watcher, int revents) { } |