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.
Understood.
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.
So can this be fixed in 0.9x? or only 1.1?
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?
Well, the problem is that a big chunk of perl XS glue code is autogenerated. And this void stuff seems to break windows (I don't run windows, just passing along the information reported by Randy).
I'll try to write an explicit wrapper, rather than using the automatically written wrapper (which relies on the prototype).
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com