From: Nick M. <ni...@us...> - 2010-08-13 21:10:27
|
Author: Gilad Benjamini <gi...@al...> Date: Fri, 13 Aug 2010 17:08:59 -0400 Subject: Clean up syntax on TAILQ_ENTRY() usage Commit: 60433a0a1a4f9efb5c2eb130f0dcd721cab67ec7 Though the C standards allow it, it's apparently possible to get MSVC upset by saying "struct { int field; } (declarator);" instead of "struct {int field; } declarator;", so let's just not do that. Bugfix for 3044492 (commit msg by nickm) --- defer-internal.h | 2 +- event-internal.h | 2 +- evrpc-internal.h | 6 +++--- http-internal.h | 4 ++-- include/event2/event_struct.h | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/defer-internal.h b/defer-internal.h index 6d21913..67e4d2a 100644 --- a/defer-internal.h +++ b/defer-internal.h @@ -41,7 +41,7 @@ typedef void (*deferred_cb_fn)(struct deferred_cb *, void *); * an event_base's event_loop, rather than running immediately. */ struct deferred_cb { /** Links to the adjacent active (pending) deferred_cb objects. */ - TAILQ_ENTRY (deferred_cb) (cb_next); + TAILQ_ENTRY (deferred_cb) cb_next; /** True iff this deferred_cb is pending in an event_base. */ unsigned queued : 1; /** The function to execute when the callback runs. */ diff --git a/event-internal.h b/event-internal.h index 6c463e8..d1620c5 100644 --- a/event-internal.h +++ b/event-internal.h @@ -272,7 +272,7 @@ struct event_base { }; struct event_config_entry { - TAILQ_ENTRY(event_config_entry) (next); + TAILQ_ENTRY(event_config_entry) next; const char *avoid_method; }; diff --git a/evrpc-internal.h b/evrpc-internal.h index c4f7209..8497d29 100644 --- a/evrpc-internal.h +++ b/evrpc-internal.h @@ -35,7 +35,7 @@ struct evrpc_request_wrapper; #define EVRPC_URI_PREFIX "/.rpc." struct evrpc_hook { - TAILQ_ENTRY(evrpc_hook) (next); + TAILQ_ENTRY(evrpc_hook) next; /* returns EVRPC_TERMINATE; if the rpc should be aborted. * a hook is is allowed to rewrite the evbuffer @@ -95,14 +95,14 @@ struct evrpc_pool { }; struct evrpc_hook_ctx { - TAILQ_ENTRY(evrpc_hook_ctx) (next); + TAILQ_ENTRY(evrpc_hook_ctx) next; void *ctx; void (*cb)(void *, enum EVRPC_HOOK_RESULT); }; struct evrpc_meta { - TAILQ_ENTRY(evrpc_meta) (next); + TAILQ_ENTRY(evrpc_meta) next; char *key; void *data; diff --git a/http-internal.h b/http-internal.h index 0380d03..073dd48 100644 --- a/http-internal.h +++ b/http-internal.h @@ -58,7 +58,7 @@ struct event_base; struct evhttp_connection { /* we use tailq only if they were created for an http server */ - TAILQ_ENTRY(evhttp_connection) (next); + TAILQ_ENTRY(evhttp_connection) next; evutil_socket_t fd; struct bufferevent *bufev; @@ -114,7 +114,7 @@ TAILQ_HEAD(evconq, evhttp_connection); /* each bound socket is stored in one of these */ struct evhttp_bound_socket { - TAILQ_ENTRY(evhttp_bound_socket) (next); + TAILQ_ENTRY(evhttp_bound_socket) next; struct evconnlistener *listener; }; diff --git a/include/event2/event_struct.h b/include/event2/event_struct.h index 7910e63..80900ea 100644 --- a/include/event2/event_struct.h +++ b/include/event2/event_struct.h @@ -71,11 +71,11 @@ struct { \ struct event_base; struct event { - TAILQ_ENTRY (event) (ev_active_next); - TAILQ_ENTRY (event) (ev_next); + TAILQ_ENTRY(event) ev_active_next; + TAILQ_ENTRY(event) ev_next; /* for managing timeouts */ union { - TAILQ_ENTRY (event) (ev_next_with_common_timeout); + TAILQ_ENTRY(event) ev_next_with_common_timeout; int min_heap_idx; } ev_timeout_pos; evutil_socket_t ev_fd; @@ -85,13 +85,13 @@ struct event { union { /* used for io events */ struct { - TAILQ_ENTRY (event) (ev_io_next); + TAILQ_ENTRY(event) ev_io_next; struct timeval ev_timeout; } ev_io; /* used by signal events */ struct { - TAILQ_ENTRY (event) (ev_signal_next); + TAILQ_ENTRY(event) ev_signal_next; short ev_ncalls; /* Allows deletes in callback */ short *ev_pncalls; -- 1.6.3 |