diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-10-21 18:48:22 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-10-21 18:48:22 +0000 |
commit | b73ad7bc4504882f7b50ed72c2643653fdc43a61 (patch) | |
tree | fa47b2cef76baac604286df38292800d066148fd /bufferevent_pair.c | |
parent | 4fbac2a5aef7bc3dee065241f20f3140c4f57b7e (diff) | |
download | libevent-b73ad7bc4504882f7b50ed72c2643653fdc43a61.tar.gz |
Treat the bitwise OR of two enum values as an int.
This makes our interfaces usable from C++, which doesn't believe
you can say "bufferevent_socket_nase(base, -1,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS)" but which instead
would demand "static_cast<bufferevent_options>(BEV_OPT_CLOSE_ON_FREE|
BEV_OPT_DEFER_CALLBACKS))" for the last argument.
Diagnosis and patch from Chris Davis.
svn:r1456
Diffstat (limited to 'bufferevent_pair.c')
-rw-r--r-- | bufferevent_pair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bufferevent_pair.c b/bufferevent_pair.c index c0d62eda..1081975a 100644 --- a/bufferevent_pair.c +++ b/bufferevent_pair.c @@ -92,7 +92,7 @@ static void be_pair_outbuf_cb(struct evbuffer *, static struct bufferevent_pair * bufferevent_pair_elt_new(struct event_base *base, - enum bufferevent_options options) + int options) { struct bufferevent_pair *bufev; if (! (bufev = mm_calloc(1, sizeof(struct bufferevent_pair)))) @@ -113,11 +113,11 @@ bufferevent_pair_elt_new(struct event_base *base, } int -bufferevent_pair_new(struct event_base *base, enum bufferevent_options options, +bufferevent_pair_new(struct event_base *base, int options, struct bufferevent *pair[2]) { struct bufferevent_pair *bufev1 = NULL, *bufev2 = NULL; - enum bufferevent_options tmp_options; + int tmp_options; options |= BEV_OPT_DEFER_CALLBACKS; tmp_options = options & ~BEV_OPT_THREADSAFE; |