Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 50519 invoked from network); 7 Dec 2004 16:25:10 -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:25:10 -0000 Received: (qmail 59415 invoked by uid 500); 7 Dec 2004 16:23:37 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 59099 invoked by uid 500); 7 Dec 2004 16:23:31 -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 59000 invoked by uid 99); 7 Dec 2004 16:23:29 -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: <41B5D8EB.3050006@stason.org> Date: Tue, 07 Dec 2004 11:23:07 -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: Stas Bekman Cc: APR Development Subject: Re: broken apr_brigade_cleanup? References: <41B5D73A.10506@stason.org> In-Reply-To: <41B5D73A.10506@stason.org> 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 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; > > why does it have (void *data) argument? why is this inconsistent with: > > APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b); > > it seems to work fine on linux but on windows causes all kind of crashes. Well, I see why it was made like this. this is because of the cleanup wrapper: APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b) { apr_pool_cleanup_kill(b->p, b, brigade_cleanup); return apr_brigade_cleanup(b); } but why apr_brigade_cleanup should be affected? what's wrong with: static apr_status_t brigade_cleanup(void *data) { return apr_brigade_cleanup((void *)data); } APU_DECLARE(apr_status_t) apr_brigade_cleanup(apr_bucket_brigade *b) { ... } -- __________________________________________________________________ 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