[zeromq-dev] 0MQ 3.0 - API improvements

Andrew Hume andrew at research.att.com
Fri Apr 8 10:18:15 CEST 2011


good point.

i like the idea in general, certainly; i have had a few cases where a core dump
was caused by my reversing the order of arguments to a zmq related routine
which would have been caught at compile time if not for the fact both args were void *.

On Apr 8, 2011, at 3:59 AM, Pieter Hintjens wrote:

> 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


------------------
Andrew Hume  (best -> Telework) +1 623-551-2845
andrew at research.att.com  (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110408/358f2c7e/attachment.htm>


More information about the zeromq-dev mailing list