[zeromq-dev] 0MQ 3.0 - API improvements
Pieter Hintjens
ph at imatix.com
Fri Apr 8 09:59:00 CEST 2011
On Fri, Apr 8, 2011 at 9:56 AM, Andrew Hume <andrew at research.att.com> wrote:
> i must admit i do the same thing for an internal library.
> the modest advantage is that the public interface
> specifies void *, but the internal hdr file
> for those routines casts it to the internally known type.
> and thus internal changes don't force external code to recompile.
The code I already posted does the same thing, but with full type checking.
We do this in all our C libraries, opaque types that can be changed
without recompiling applications. It does not require void pointers.
Look at libzapi if you want to see how it works. http://zero.mq/c.
-Pieter
More information about the zeromq-dev
mailing list