Commit 63adb8e7 authored by Jason Madden's avatar Jason Madden

lint

parent fd57ead7
......@@ -215,7 +215,7 @@ _watcher_types = ['ev_io',
'ev_fork',
'ev_async',
'ev_child',
'ev_stat',]
'ev_stat', ]
_source = """ // passed to the real C compiler
#define LIBEV_EMBED 1
......@@ -244,15 +244,14 @@ for _watcher_type in _watcher_types:
...;
};
static void _gevent_%s_callback(struct ev_loop* loop, struct %s* watcher, int revents);
""" %(_watcher_type, _watcher_type, _watcher_type, _watcher_type)
""" % (_watcher_type, _watcher_type, _watcher_type, _watcher_type)
_source += """
struct gevent_%s {
struct %s watcher;
void* handle;
};
""" %(_watcher_type, _watcher_type)
""" % (_watcher_type, _watcher_type)
_source += """
static void _gevent_%s_callback(struct ev_loop* loop, struct %s* watcher, int revents)
......@@ -279,6 +278,7 @@ del thisdir, include_dirs, _watcher_type, _watcher_types
libev.vfd_open = libev.vfd_get = lambda fd: fd
libev.vfd_free = lambda fd: None
@ffi.callback("int(void* handle, int revents)")
def _python_callback(handle, revents):
watcher = ffi.from_handle(handle)
......@@ -298,6 +298,7 @@ libev.python_callback = _python_callback
# Therefore the other functions need to correctly deal with an
# invalid handle
@ffi.callback("void(void* handle, int revents)")
def _python_handle_error(handle, revents):
try:
......@@ -318,6 +319,7 @@ def _python_handle_error(handle, revents):
return
libev.python_handle_error = _python_handle_error
@ffi.callback("void(void* handle)")
def _python_stop(handle):
try:
......
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