[zeromq-dev] zmq.h constants -> enums

Alexey Melnichuk mimir at newmail.ru
Tue Oct 8 12:56:09 CEST 2013


Pieter Hintjens <ph <at> imatix.com> writes:

> 
> Hi all,
> 
> Especially binding authors and those using ZeroMQ in C:
> 
> There is a patch on libzmq master that replaces the macros in zmq.h
> with enums. See
> https://github.com/zeromq/libzmq/blob/master/include/zmq.h#L183
> 
> The numeric values don't change but any code that depends on the
> preprocessor seeing these macros will be affected. For CZMQ I only
> check macros if ZMQ_VERSION_MAJOR is 2 or 3.
> 
> Before I backport this to 4-x, I'd like some feedback; if the
> consensus is that this change is too traumatic, we'll revert it on
> libzmq master. Otherwise I'll pull it into the 4-x release.
> 

I am athor of lua binding[1].
For me macros are convinient because of i can just add one more ifdef
and forget about that [2]. If some mocro was remove i do not need to wrap
this macro to version detection `#if`.

[1] https://github.com/moteus/lzmq
[2] https://github.com/moteus/lzmq/blob/master/src/zsocket.c#L403




More information about the zeromq-dev mailing list