Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: public API/ABI changes depending on the version of libzmq #1603

Closed
bluca opened this issue Jan 13, 2017 · 0 comments
Closed

Problem: public API/ABI changes depending on the version of libzmq #1603

bluca opened this issue Jan 13, 2017 · 0 comments

Comments

@bluca
Copy link
Member

bluca commented Jan 13, 2017

In order to guarantee a stable API, I think the various zsock_ options functions should always be available. They are already ifdef'ed to no-ops if at build time the corresponding option is not available, which is the correct approach for broader compatibility, so there shouldn't be a broader ifdef checking the libzmq version.

This is mostly a reminder for myself as I don't have time right now, hopefully next week.

bluca added a commit to bluca/czmq that referenced this issue Jan 21, 2017
Solution: keep the public API stable regardless of the libzmq version
available at build time.
All the zsock_* options functions will always be available, but with
both build time and runtime checks.
This ensure full transparent compatibility with all versions of
libzmq, and avoids ABI breakages during rebuilds.
Achieved by removing the global ifdefs around the libzmq version and
by avoiding redefining the same option for differen versions in
sockopts.xml.
Since libzmq does strict type size enforcement we can't simply cast
up or down. Introduce new attributes "major_changed" and "type_new"
to signal when an option type changes and to what.

Fixes zeromq#1603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant