On Tue, Nov 01, 2005 at 11:54:18PM +0100, André Malo wrote: > * Nick Kew wrote: > > > On Tuesday 01 November 2005 22:44, André Malo wrote: > > > * [EMAIL PROTECTED] wrote: > > > > +#define CLEANUP_CAST (apr_status_t (*)(void*)) > > > > > > Hmm. That looks strange to me. Wouldn't a typedef (+ casts in place) > > > serve better? > > > > Huh? It is a cast. No more, no less. > > Yep. I'd do it in place anyway. The macro actually decreases readability > here (IMHO, of course ;-). > > Further thinking, the typedef is actually missing in apr_pools.h. Not sure > about the policy - could this be added for the next APR version?
This code has undefined behaviour by the C standard (calling a function via a function pointer of incompatible type), such casts should never be used at all IMO. joe
