[nanomsg] Re: Compile-time detection of API changes

  • From: Dirkjan Ochtman <dirkjan@xxxxxxxxxx>
  • To: nanomsg <nanomsg@xxxxxxxxxxxxx>
  • Date: Thu, 18 Sep 2014 09:02:28 +0200

On Thu, Sep 18, 2014 at 1:33 AM, Aaron Faanes <dafrito@xxxxxxxxx> wrote:
> I was wondering what the convention is within nanomsg for detecting API
> changes such as these, so that my binding could support nanomsg versions
> both before and after such changes without needing to check out different
> versions of the binding.

At run-time, or at compile-time? I guess you might be able to use the
ABI versions (NN_VERSION_* in src/nn.h) to find out if the ABI version
is high enough to include these new functions. On the other hand,
we've historically only bumped these at release time, not at the time
we actually push new API's, so it doesn't work as well for
yet-to-be-released functionality.

Cheers,

Dirkjan

Other related posts: