diff options
author | Martin Lucina <martin@lucina.net> | 2012-05-20 11:24:59 +0200 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-05-20 11:24:59 +0200 |
commit | 56619463ac26dc6c3e576d2fbf6b544eebeb5148 (patch) | |
tree | f23e0eed3e7d347e71e5a6b4f983692bdec2078d /include | |
parent | 4016b657973bba87caf75168ba70aaa85d556487 (diff) |
Imported Upstream version 2.2.0upstream
Diffstat (limited to 'include')
-rw-r--r-- | include/zmq.h | 8 | ||||
-rw-r--r-- | include/zmq.hpp | 13 |
2 files changed, 16 insertions, 5 deletions
diff --git a/include/zmq.h b/include/zmq.h index a507156..3352b26 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -54,8 +54,8 @@ extern "C" { /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 2 -#define ZMQ_VERSION_MINOR 1 -#define ZMQ_VERSION_PATCH 11 +#define ZMQ_VERSION_MINOR 2 +#define ZMQ_VERSION_PATCH 0 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) @@ -211,7 +211,9 @@ ZMQ_EXPORT int zmq_term (void *context); #define ZMQ_BACKLOG 19 #define ZMQ_RECOVERY_IVL_MSEC 20 /* opt. recovery time, reconcile in 3.x */ #define ZMQ_RECONNECT_IVL_MAX 21 - +#define ZMQ_RCVTIMEO 27 +#define ZMQ_SNDTIMEO 28 + /* Send/recv options. */ #define ZMQ_NOBLOCK 1 #define ZMQ_SNDMORE 2 diff --git a/include/zmq.hpp b/include/zmq.hpp index bfba0f6..0db6738 100644 --- a/include/zmq.hpp +++ b/include/zmq.hpp @@ -23,6 +23,7 @@ #include "zmq.h" +#include <algorithm> #include <cassert> #include <cstring> #include <exception> @@ -40,6 +41,14 @@ # define ZMQ_HAS_RVALUE_REFS #endif +// In order to prevent unused variable warnings when building in non-debug +// mode use this macro to make assertions. +#ifndef NDEBUG +# define ZMQ_ASSERT(expression) assert(expression) +#else +# define ZMQ_ASSERT(expression) (expression) +#endif + namespace zmq { @@ -118,7 +127,7 @@ namespace zmq inline ~message_t () { int rc = zmq_msg_close (this); - assert (rc == 0); + ZMQ_ASSERT (rc == 0); } inline void rebuild () @@ -214,7 +223,7 @@ namespace zmq if (ptr == NULL) return; int rc = zmq_term (ptr); - assert (rc == 0); + ZMQ_ASSERT (rc == 0); } // Be careful with this, it's probably only useful for |