> bmoeller> &cb,
> bmoeller> on the other hand, is the pointer to some data object; the
> bmoeller> function that gets this pointer as an argument has to
> bmoeller> retrieve the actual function pointer from inside this data
> bmoeller> object, i.e. use *((void (**)()) arg) where arg is the void
> bmoeller> * argument passed to it.
Exactly my point. I chose to "typdef void (*cb_t)()" and then "*((cb_t
*)arg)" as it's more readable.
>
> I was pondering such a solution, but I foresaw a problem with it:
> &strcmp is the same as strcmp,
Yes, but cb and &cb aren't the same at all and we all know that.
> and that might be a difficult bug to find...
Well, just make sure the union is passed by reference and do drop some
comment around it.
Andy.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]