Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 72121 invoked from network); 7 Dec 2004 16:54:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Dec 2004 16:54:48 -0000 Received: (qmail 77325 invoked by uid 500); 7 Dec 2004 16:54:01 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 77263 invoked by uid 500); 7 Dec 2004 16:54:00 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 77215 invoked by uid 99); 7 Dec 2004 16:54:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Message-ID: <41B5E022.5070506@stason.org> Date: Tue, 07 Dec 2004 11:53:54 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Joe Orton Cc: APR Development Subject: Re: broken apr_brigade_cleanup? References: <41B5D73A.10506@stason.org> <20041207162646.GB32686@redhat.com> In-Reply-To: <20041207162646.GB32686@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Orton wrote: > 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:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com