summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorroot <root>2007-11-03 22:10:39 +0000
committerroot <root>2007-11-03 22:10:39 +0000
commit36ed1953891a670e15f5e113491596630f21676c (patch)
tree4d90c5d579adec56ab460557ee52e0505b869d20 /event.c
parent228b0b302ab0857b23efad5a8b2429de2c0ccc00 (diff)
*** empty log message ***
Diffstat (limited to 'event.c')
-rw-r--r--event.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/event.c b/event.c
index b1c335e..1c2bc73 100644
--- a/event.c
+++ b/event.c
@@ -35,11 +35,19 @@
#include "event.h"
-#define dLOOPev
-#define dLOOPbase
+#ifdef EV_MULTIPLICITY
+# define dLOOPev struct ev_loop *loop = ev->ev_base->loop
+# define dLOOPbase struct ev_loop *loop = base->loop
+#else
+# define dLOOPev
+# define dLOOPbase
+#endif
struct event_base
{
+#ifdef EV_MULTIPLICITY
+ struct ev_loop *loop;
+#endif
int dummy;
};
@@ -83,6 +91,8 @@ void *event_init (void)
void event_base_free (struct event_base *base)
{
+ dLOOPbase;
+
/* nop */
}
@@ -265,7 +275,8 @@ int event_base_set (struct event_base *base, struct event *ev)
int event_base_loop (struct event_base *base, int flags)
{
dLOOPbase;
- ev_loop (EV_A_ flags | EVLOOP_ONESHOT);
+
+ ev_loop (EV_A_ flags);
return 0;
}