From dev-return-14147-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed May 04 12:54:26 2005 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 47057 invoked from network); 4 May 2005 12:54:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2005 12:54:26 -0000 Received: (qmail 99065 invoked by uid 500); 4 May 2005 12:55:21 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 98980 invoked by uid 500); 4 May 2005 12:55:19 -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 98917 invoked by uid 99); 4 May 2005 12:55:17 -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: domain of jorton@redhat.com designates 66.187.233.31 as permitted sender) Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 04 May 2005 05:55:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j44CrCXZ000877 for ; Wed, 4 May 2005 08:53:12 -0400 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j44Cr5O30285 for ; Wed, 4 May 2005 08:53:05 -0400 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.13.1/8.12.7) with ESMTP id j44Cr2bd023211 for ; Wed, 4 May 2005 13:53:02 +0100 Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.1/8.12.10/Submit) id j44Cr1Rn023206 for dev@apr.apache.org; Wed, 4 May 2005 13:53:01 +0100 Date: Wed, 4 May 2005 13:53:01 +0100 From: Joe Orton To: dev@apr.apache.org Subject: Re: apr_pool_join, WAS: Re: svn commit: r168115 - in /apr/apr/trunk: include/apr_pools.h memory/unix/apr_pools.c Message-ID: <20050504125301.GB17319@redhat.com> Mail-Followup-To: dev@apr.apache.org References: <20050504113028.23414.qmail@minotaur.apache.org> <4278BB4B.5010200@apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4278BB4B.5010200@apache.org> User-Agent: Mutt/1.4.1i X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Wed, May 04, 2005 at 02:08:43PM +0200, Sander Striker wrote: > jorton@apache.org wrote: > >--- apr/apr/trunk/include/apr_pools.h (original) > >+++ apr/apr/trunk/include/apr_pools.h Wed May 4 04:30:27 2005 > >@@ -392,11 +392,15 @@ > > APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool); > > > > /** > >- * Determine if pool a is an ancestor of pool b > >+ * Determine if pool a is an ancestor of pool b. > > * @param a The pool to search > > * @param b The pool to search for > > * @return True if a is an ancestor of b, NULL is considered an ancestor > > * of all pools. > >+ * @remark if compiled with APR_POOL_DEBUG, this function will also > >+ * return true if A is a pool which has been guaranteed by the caller > >+ * (using apr_pool_join) to have a lifetime at least as long as some > >+ * ancestor of pool B. > > */ > > APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b); > > I'd rather see a new function for this. apr_pool_will_outlive()? > apr_pool_outlives()? > Naming isn't my strong part. Anyways, I'd like to see ancestor mean > ancestor and not something else. Mostly because ancestry is not only about > lifetimes but about hierarchy as well. I thought about that that too, but since this is exactly how all existing uses of pool-joining/ancestry *expect* the function to behave, I think it should really keep the name. It also matches up with the commentary of pool lifetime issues in apr_pools.h. Regards, joe