summaryrefslogtreecommitdiff
path: root/evmap.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-07 09:58:24 -0400
committerNick Mathewson <nickm@torproject.org>2012-09-07 09:58:24 -0400
commit232055ef4988e9ba5b9e62230bd6db0506349a8d (patch)
tree4aa78fe1eb113637464cf1b72221992007a48ad1 /evmap.c
parent84fd6d750642ff88ba5ab3e6b3f6fbba7868698c (diff)
downloadlibevent-232055ef4988e9ba5b9e62230bd6db0506349a8d.tar.gz
Tweak patch for event_base_foreach_event()
* Fix whitespace * Explain return value from callback function * Reinstate return value so that caller can tell whether forech exited early. * Rename event_base_foreach_event_() to event_base_foreach_event_nolock_(). * Use event_base_foreach_event_cb_fn typedef in more places * Be more dire about undefined behavior.
Diffstat (limited to 'evmap.c')
-rw-r--r--evmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/evmap.c b/evmap.c
index e02e4e91..d2160fbe 100644
--- a/evmap.c
+++ b/evmap.c
@@ -963,7 +963,7 @@ evmap_check_integrity_(struct event_base *base)
/* Helper type for evmap_foreach_event_: Bundles a function to call on every
* event, and the user-provided void* to use as its third argument. */
struct evmap_foreach_event_helper {
- int (*fn)(const struct event_base *, const struct event *, void *);
+ event_base_foreach_event_cb fn;
void *arg;
};
@@ -1001,7 +1001,7 @@ evmap_signal_foreach_event_fn(struct event_base *base, int signum,
int
evmap_foreach_event_(struct event_base *base,
- int (*fn)(const struct event_base *, const struct event *, void *), void *arg)
+ event_base_foreach_event_cb fn, void *arg)
{
struct evmap_foreach_event_helper h;
int r;