apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: apr_pool_join, WAS: Re: svn commit: r168115 - in /apr/apr/trunk: include/apr_pools.h memory/unix/apr_pools.c
Date Wed, 04 May 2005 12:53:01 GMT
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

Mime
View raw message