summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-11 10:29:33 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-11 10:29:33 +0100
commitbd9213e71222df66634d59581264ffe67210222c (patch)
treedbb334847c48aafa0d12def19aaf264139ce09eb /src
parent7cab423fc20e46f54fa561e51b566cc8a63ca5c1 (diff)
ZMQII-72: Add zmq_version function
Diffstat (limited to 'src')
-rw-r--r--src/config.hpp4
-rw-r--r--src/zmq.cpp8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp
index 9724733..a0d5755 100644
--- a/src/config.hpp
+++ b/src/config.hpp
@@ -27,6 +27,10 @@ namespace zmq
enum
{
+ // Current version of 0MQ.
+ version_major = 0,
+ version_minor = 0,
+ version_patch = 0,
// Number of new messages in message pipe needed to trigger new memory
// allocation. Setting this parameter to 256 decreases the impact of
diff --git a/src/zmq.cpp b/src/zmq.cpp
index 3ebd8d0..609c8f2 100644
--- a/src/zmq.cpp
+++ b/src/zmq.cpp
@@ -30,6 +30,7 @@
#include "msg_content.hpp"
#include "platform.hpp"
#include "stdint.hpp"
+#include "config.hpp"
#include "err.hpp"
#include "fd.hpp"
@@ -49,6 +50,13 @@
#include <pgm/pgm.h>
#endif
+void zmq_version (int *major_, int *minor_, int *patch_)
+{
+ *major_ = zmq::version_major;
+ *minor_ = zmq::version_minor;
+ *patch_ = zmq::version_patch;
+}
+
const char *zmq_strerror (int errnum_)
{
switch (errnum_) {