[zeromq-dev] Making language bindings work with both maint andmaster

Joshua Foster jhawk28 at gmail.com
Sun Oct 3 03:12:25 CEST 2010


  Another approach is to tag the binding's baseline with the version 
that it matches. That way if we want to use 2.0.8, we just update to 
that tag. If there is a version specific fix, we can always create a 
small branch for that version.

Joshua

On 10/2/2010 4:34 PM, Mikko Koppanen wrote:
> On Sat, Oct 2, 2010 at 9:01 PM, Martin Sustrik<sustrik at 250bpm.com>  wrote:
>> On 10/02/2010 09:59 PM, gonzalo diethelm wrote:
>>> My suggestion was to have #define macros to identify the version of 0MQ
>>> against which a binding is being compiled. Something like ZMQ_MAJOR,
>>> ZMQ_MINOR, etc. Or a single #define ZMQ_VERSION to 20101002 (YYYYMMDD).
>> Yeah, something like that. Let's see what other binding maintainer say
>> about the topic.
> Hi,
>
> Things such as ZMQ_TYPE are easy to ifdef out based on the constant
> but breaks in functionality or API are possibly harder without
> 'pre-processor-checkable' version number.
>
> Let's say I wanted certain functionality to be present if libzmq
> version is 2.1.1 or higher.
>
> With version id it would be the following (major,three digits for
> minor,three digits for patch)
>
> #if ZMQ_VERSION_ID>= 2001001
>
> Where as with ZMQ_MAJOR/MINOR/PATCH it would be:
>
> #if ZMQ_MAJOR>  2 || (ZMQ_MAJOR == 2&&  ZMQ_MINOR>= 1&&  ZMQ_PATCH>= 1)
>
> I guess this is a matter of taste but I prefer the former one (there
> is no harm in defining both).
>
>
> What would be the benefit of using YYYYMMDD instead of the actual
> version number?
>




More information about the zeromq-dev mailing list