#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;
};
void event_base_free (struct event_base *base)
{
+ dLOOPbase;
+
/* nop */
}
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;
}