--- libev/ev.h 2010/03/16 00:26:41 1.135 +++ libev/ev.h 2010/03/16 17:11:49 1.137 @@ -47,26 +47,27 @@ /*****************************************************************************/ #ifndef EV_FEATURES -# define EV_FEATURES 0x3f +# define EV_FEATURES 0x7f #endif #define EV_FEATURE_CODE ((EV_FEATURES) & 1) #define EV_FEATURE_DATA ((EV_FEATURES) & 2) -#define EV_FEATURE_API ((EV_FEATURES) & 4) -#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 8) -#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 16) -#define EV_FEATURE_OS ((EV_FEATURES) & 32) +#define EV_FEATURE_CONFIG ((EV_FEATURES) & 4) +#define EV_FEATURE_API ((EV_FEATURES) & 8) +#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16) +#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32) +#define EV_FEATURE_OS ((EV_FEATURES) & 64) -/* these priorities are inclusive, higher priorities will be called earlier */ +/* these priorities are inclusive, higher priorities will be invoked earlier */ #ifndef EV_MINPRI -# define EV_MINPRI (EV_FEATURE_API ? -2 : 0) +# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0) #endif #ifndef EV_MAXPRI -# define EV_MAXPRI (EV_FEATURE_API ? +2 : 0) +# define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0) #endif #ifndef EV_MULTIPLICITY -# define EV_MULTIPLICITY EV_FEATURE_API +# define EV_MULTIPLICITY EV_FEATURE_CONFIG #endif #ifndef EV_PERIODIC_ENABLE @@ -170,8 +171,15 @@ # define EV_INLINE static #endif +#ifndef EV_PROTOTYPES +# define EV_PROTOTYPES 1 +#endif + /*****************************************************************************/ +#define EV_VERSION_MAJOR 4 +#define EV_VERSION_MINOR 0 + /* eventmask, revents, events... */ #define EV_UNDEF -1 /* guaranteed to be invalid */ #define EV_NONE 0x00 /* no events */ @@ -198,12 +206,6 @@ #ifndef EV_COMMON # define EV_COMMON void *data; #endif -#ifndef EV_PROTOTYPES -# define EV_PROTOTYPES 1 -#endif - -#define EV_VERSION_MAJOR 3 -#define EV_VERSION_MINOR 9 #ifndef EV_CB_DECLARE # define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents); @@ -212,6 +214,9 @@ # define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents)) #endif +/* not official, do not use */ +#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents) + /* * struct member types: * private: you may look at them, but not change them, @@ -231,7 +236,7 @@ #if EV_MINPRI == EV_MAXPRI # define EV_DECL_PRIORITY -#else +#elif !defined (EV_DECL_PRIORITY) # define EV_DECL_PRIORITY int priority; #endif