From: Niels Provos Date: Sat, 27 Jan 2007 04:06:52 +0000 (+0000) Subject: extern "C" guard for header file. X-Git-Tag: release-2.0.1-alpha~662 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4922f342fcbad0f56c6de5f40a00b029d6757823;p=libevent extern "C" guard for header file. assert activeq in event.c; from Phil Oelson. svn:r313 --- diff --git a/evdns.h b/evdns.h index ee272d20..d502564d 100644 --- a/evdns.h +++ b/evdns.h @@ -237,6 +237,10 @@ #ifndef EVENTDNS_H #define EVENTDNS_H +#ifdef __cplusplus +extern "C" { +#endif + /* Error codes 0-5 are as described in RFC 1035. */ #define DNS_ERR_NONE 0 /* The name server was unable to interpret the query */ @@ -303,4 +307,8 @@ void evdns_set_log_fn(evdns_debug_log_fn_type fn); #define DNS_NO_SEARCH 1 +#ifdef __cplusplus +} +#endif + #endif // !EVENTDNS_H diff --git a/event.c b/event.c index 90f88ab6..f6d2b1cc 100644 --- a/event.c +++ b/event.c @@ -301,6 +301,8 @@ event_process_active(struct event_base *base) } } + assert(activeq != NULL); + for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) { event_queue_remove(base, ev, EVLIST_ACTIVE);