]> git.ipfire.org Git - thirdparty/bird.git/blobdiff - lib/event.h
Lib: Add and use ev_new_init()
[thirdparty/bird.git] / lib / event.h
index d59752220d00241296e5916157d5a548fc3c0e98..03735c3fcc2166046dc1c3bdb3deb5ec470cb574 100644 (file)
@@ -36,5 +36,14 @@ ev_active(event *e)
   return e->n.next != NULL;
 }
 
+static inline event*
+ev_new_init(pool *p, void (*hook)(void *), void *data)
+{
+  event *e = ev_new(p);
+  e->hook = hook;
+  e->data = data;
+  return e;
+}
+
 
 #endif