X-Git-Url: https://git.llucax.com/software/eventxx.git/blobdiff_plain/db68e3cbf30676b02e11c88be235d62914d55cae..868ab76df09c012534e12b21543affdb14ffea4e:/eventxx
diff --git a/eventxx b/eventxx
index ad23806..2ee228d 100644
--- a/eventxx
+++ b/eventxx
@@ -142,8 +142,8 @@
* patch your libevent (for example, using this patch
* written by Mark D. Anderson, and who knows why it's not still applied). If
- * you do so, you can compile your programs with @c -DEVENT_BASE_FREE_FIX so
- * @c event_base_free() gets called in the eventxx::dispatcher @link
+ * you do so, you can compile your programs with @c -DEVENTXX_EVENT_BASE_FREE_FIX
+ * so @c event_base_free() gets called in the eventxx::dispatcher @link
* eventxx::dispatcher::~dispatcher() destructor @endlink.
*
* That said, I think it's still pretty usable anyways. If something is broken
@@ -158,7 +158,7 @@
*
* @author Leandro Lucarella
*
- * @version 0.2
+ * @version 0.4
*
* @par License
* This program is under the BOLA license (see
@@ -414,9 +414,10 @@ enum type
PERSIST = EV_PERSIST ///< Not really an event, is an event modifier.
};
+inline
type operator| (const type& t1, const type& t2)
{
- int r = t1 | t2;
+ int r = static_cast< int >(t1) | static_cast< int >(t2);
return *reinterpret_cast< type* >(&r);
}
@@ -790,15 +791,17 @@ struct dispatcher
internal::event_base_priority_init(_event_base, npriorities);
}
-#ifdef EVENT_BASE_FREE_FIX
+#ifdef EVENTXX_BASE_FREE_FIX
/// Free dispatcher resources, see @ref Status section for details.
~dispatcher() throw() { event_base_free(_event_base); }
#else
+#ifndef EVENTXX_NO_WARNING
#warning "The dispatcher class *will* leak memory because of a libevent bug, " \
"see http://www.mail-archive.com/libevent-users@monkey.org/msg00110.html " \
"for more info an a patch. If you already have this patch, please " \
- "-DEVENT_BASE_FREE_FIX to your compiler to make this message disappear " \
+ "-DEVENTXX_EVENT_BASE_FREE_FIX to your compiler to make this message disappear " \
"and really free the dispatcher memory using event_base_free()."
+#endif
#endif
/**