[zeromq-dev] Strict aliasing problem
Lourens Naudé
lourens at methodmissing.com
Thu May 17 16:31:54 CEST 2012
Hi Guys,
I can try to take care of this later today / tomorrow morning. Apologies
for the sockopt regressions with the ZMQ_MONITOR patch.
I thought about the callback per context before, however not all sockets
would always handle an event in the same way. Thoughts ?
- Lourens
On Thu, May 17, 2012 at 3:24 PM, Pieter Hintjens <ph at imatix.com> wrote:
> On Thu, May 17, 2012 at 4:14 AM, Bjorn Reese <breese at mail1.stofanet.dk>
> wrote:
>
> > 1. As the only standards-compliant way "casting" between
> > pointer-to-object and pointer-to-function is through a union, the
> > zmq_monitor_fn type could be changed to something like:
> >
> > typedef union
> > {
> > void *object;
> > void (*function)(void *s, int event, zmq_event_data_t *data);
> > } zmq_monitor_fn;
>
> This is what I'd do. It's not the simplest option but it a correct
> one. Callbacks are going to be complex anyhow.
>
> If we only want a single callback per context it could be registered
> at the zmq_ctx_ level, with a neat API.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120517/8600ed66/attachment.htm>
More information about the zeromq-dev
mailing list