Re: C callback

[email protected] (Joshua N Pritikin)
Newsgroups perl.loop
Message-ID <[email protected]>
On Tue, Dec 05, 2000 at 09:28:29PM +0000, [email protected] wrote:
> Joshua N Pritikin <[email protected]> writes:
> >OK.  Does anyone oppose changing the C callback from:
> >
> >(* (void(*)(void*,pe_event*)) ev->callback)(ev->ext_data, ev);
> >
> >To:
> >
> >(* (void(*)(pe_event*,void*)) ev->callback)(ev, ev->ext_data);
> >
> >?
> 
> I prefer the latter - it makes it more method-call-like.

i'll count that as a vote *for* the binary incompatible change.  For
what it's worth, i decided to change the prototype to:

  (* (void(*)(pe_event*)) ev->callback)(ev);

After all, ext_data is already available via ev->ext_data, if needed,
and if the callback doesn't need ext_data then there is a *slight*
performance gain.  ;-)

-- 
May the best description of competition prevail.
      (via, but not speaking for Deutsche Bank)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.