]> git.llucax.com Git - software/libev.git/blobdiff - event.h
improve event compatibility, make watchers much smaller by union'ising io and sig...
[software/libev.git] / event.h
diff --git a/event.h b/event.h
index 18aa3a6f09c6a5abeeef5dc1502f243e9e0cc349..03506ad63656dde9e7391cef8421e658449659a5 100644 (file)
--- a/event.h
+++ b/event.h
@@ -38,11 +38,15 @@ extern "C" {
 #include "ev.h"
 
 struct event
 #include "ev.h"
 
 struct event
-  {
-  struct ev_io io;
+{
+  /* lib watchers we map to */
+  union {
+    struct ev_io io;
+    struct ev_signal sig;
+  } iosig;
   struct ev_timer to;
   struct ev_timer to;
-  struct ev_signal sig;
 
 
+  /* compatibility slots */
   struct event_base *ev_base;
   void (*ev_callback)(int, short, void *arg);
   void *ev_arg;
   struct event_base *ev_base;
   void (*ev_callback)(int, short, void *arg);
   void *ev_arg;