diff options
author | root <root> | 2007-11-09 20:55:09 +0000 |
---|---|---|
committer | root <root> | 2007-11-09 20:55:09 +0000 |
commit | c4977e2742acfd90d4c4abd068f1c9e284951ef5 (patch) | |
tree | 7525b5878eaaa78390faf267cf806f950d83f47b /ev.h | |
parent | c20764a666b81af46b955c75eef0f6b088c821b0 (diff) |
*** empty log message ***
Diffstat (limited to 'ev.h')
-rw-r--r-- | ev.h | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -87,6 +87,13 @@ struct ev_loop; #define EV_VERSION_MAJOR 1 #define EV_VERSION_MINOR 1 +#ifndef EV_CB_DECLARE +# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents) +#endif +#ifndef EV_CB_INVOKE +# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents)) +#endif + /* * struct member types: * private: you can look at them, but not change them, and they might not mean anything to you. @@ -100,7 +107,7 @@ struct ev_loop; int pending; /* private */ \ int priority; /* private */ \ EV_COMMON; /* rw */ \ - void (*cb)(EV_P_ struct type *, int revents) /* private */ /* gets invoked with an eventmask */ + EV_CB_DECLARE (type) /* private */ #define EV_WATCHER_LIST(type) \ EV_WATCHER (type); \ @@ -111,17 +118,20 @@ struct ev_loop; ev_tstamp at /* private */ /* base class, nothing to see here unless you subclass */ -struct ev_watcher { +struct ev_watcher +{ EV_WATCHER (ev_watcher); }; /* base class, nothing to see here unless you subclass */ -struct ev_watcher_list { +struct ev_watcher_list +{ EV_WATCHER_LIST (ev_watcher_list); }; /* base class, nothing to see here unless you subclass */ -struct ev_watcher_time { +struct ev_watcher_time +{ EV_WATCHER_TIME (ev_watcher_time); }; |