From 29d5b3e06c94824ddd3235eb489b0c2eb9d3a73e Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Thu, 16 Oct 2014 13:19:53 +0200 Subject: [PATCH] Init function for getdns_eventloop_events --- src/getdns/getdns_extra.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/getdns/getdns_extra.h b/src/getdns/getdns_extra.h index 681142ca..848172da 100644 --- a/src/getdns/getdns_extra.h +++ b/src/getdns/getdns_extra.h @@ -82,6 +82,12 @@ typedef struct getdns_eventloop_event { void *ev; } getdns_eventloop_event; +inline void getdns_eventloop_init_event(getdns_eventloop_event *el, + void *userarg, getdns_eventloop_callback read_cb, + getdns_eventloop_callback write_cb, getdns_eventloop_callback timeout_cb) +{ el->userarg = userarg; el->read_cb = read_cb; el->write_cb = write_cb; + el->timeout_cb = timeout_cb; el->ev = NULL; } + typedef struct getdns_eventloop_vmt getdns_eventloop_vmt; typedef struct getdns_eventloop { getdns_eventloop_vmt *vmt;