mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
ZMQII-72: Add zmq_version function
This commit is contained in:
parent
7cab423fc2
commit
bd9213e712
@ -39,6 +39,12 @@ extern "C" {
|
|||||||
#define ZMQ_EXPORT
|
#define ZMQ_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// 0MQ versioning supprt.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// 0MQ errors.
|
// 0MQ errors.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -27,6 +27,10 @@ namespace zmq
|
|||||||
|
|
||||||
enum
|
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
|
// Number of new messages in message pipe needed to trigger new memory
|
||||||
// allocation. Setting this parameter to 256 decreases the impact of
|
// allocation. Setting this parameter to 256 decreases the impact of
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "msg_content.hpp"
|
#include "msg_content.hpp"
|
||||||
#include "platform.hpp"
|
#include "platform.hpp"
|
||||||
#include "stdint.hpp"
|
#include "stdint.hpp"
|
||||||
|
#include "config.hpp"
|
||||||
#include "err.hpp"
|
#include "err.hpp"
|
||||||
#include "fd.hpp"
|
#include "fd.hpp"
|
||||||
|
|
||||||
@ -49,6 +50,13 @@
|
|||||||
#include <pgm/pgm.h>
|
#include <pgm/pgm.h>
|
||||||
#endif
|
#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_)
|
const char *zmq_strerror (int errnum_)
|
||||||
{
|
{
|
||||||
switch (errnum_) {
|
switch (errnum_) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user