On Tue, Dec 07, 2004 at 11:15:54AM -0500, Stas Bekman wrote:
> apr_brigade_cleanup looks wrong:
>
> APU_DECLARE(apr_status_t) apr_brigade_cleanup(void *data)
> {
> apr_bucket_brigade *b = data;
> apr_bucket *e;
>
> shouldn't it be:
>
> apr_bucket_brigade *b = (apr_bucket_brigade *)data;
Explicit casts from void * to other pointer types are only needed for
really old pre-ISO C compilers on which APR probably doesn't work
anyway.
> why does it have (void *data) argument? why is this inconsistent with:
>
> APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b);
Yes, it should be consistent with _destroy, that looks like a
copy'n'paste mistake from the brigade_cleanup function possibly.
> it seems to work fine on linux but on windows causes all kind of crashes.
The only practical effect is the lost type-safety, it's otherwise fine.
If you fix the prototype in apr-util and rebuild mod_perl/etc does that
reveal any compiler warnings?
Regards,
joe