diff options
Diffstat (limited to 'lib/event.h')
-rw-r--r-- | lib/event.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/event.h b/lib/event.h index d5975222..14a54730 100644 --- a/lib/event.h +++ b/lib/event.h @@ -36,5 +36,14 @@ ev_active(event *e) return e->n.next != NULL; } +static inline event* +ev_new_set(pool *p, void (*hook)(void *), void *data) +{ + event *e = ev_new(p); + e->hook = hook; + e->data = data; + return e; +} + #endif |