summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ev.h b/ev.h
index f2ec3f2..af6c2da 100644
--- a/ev.h
+++ b/ev.h
@@ -269,7 +269,17 @@ void ev_set_syserr_cb (void (*cb)(const char *msg));
# if EV_MULTIPLICITY
/* the default loop is the only one that handles signals and child watchers */
/* you can call this as often as you like */
-struct ev_loop *ev_default_loop (unsigned int flags); /* returns default loop */
+static struct ev_loop *
+ev_default_loop (unsigned int flags)
+{
+ extern struct ev_loop *ev_default_loop_ptr;
+ extern struct ev_loop *ev_default_loop_ (unsigned int flags);
+
+ if (!ev_default_loop_ptr)
+ ev_default_loop_ (flags);
+
+ return ev_default_loop_ptr;
+}
/* create and destroy alternative loops that don't handle signals */
struct ev_loop *ev_loop_new (unsigned int flags);