Randy Kobes wrote:
[...]
I'm not sure if this helps, but I tried instead of the
above the following:
=============================================================
Index: xs/APR/Pool/APR__Pool.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/Pool/APR__Pool.h,v
retrieving revision 1.6
diff -u -r1.6 APR__Pool.h
--- xs/APR/Pool/APR__Pool.h     9 Sep 2003 17:22:39 -0000       1.6
+++ xs/APR/Pool/APR__Pool.h     25 Sep 2003 06:50:44 -0000
@@ -1,4 +1,5 @@
 #define MP_APR_POOL_NEW "APR::Pool::new"
+#define MP_APR_SUBPOOL_NEW "APR::SubPool::new"

 /**
  * create a new pool or subpool
@@ -9,11 +10,12 @@
 {
     apr_pool_t *parent = mpxs_sv_object_deref(obj, apr_pool_t);
     apr_pool_t *newpool = NULL;
+    const char *key = parent ? MP_APR_SUBPOOL_NEW : MP_APR_POOL_NEW;
     (void)apr_pool_create(&newpool, parent);

     /* mark the pool as being created via APR::Pool->new()
      * see mpxs_apr_pool_DESTROY */
-    apr_pool_userdata_set((const void *)1, MP_APR_POOL_NEW,
+    apr_pool_userdata_set((const void *)1, key,
                           apr_pool_cleanup_null, newpool);

     return newpool;
==================================================================
(ie, leave the original key in mpxs_apr_pool_DESTROY as
MP_APR_POOL_NEW alone) - in this case, the apr/pool tests
pass, as did all the filter tests. However, running the
tests all together resulted in a problem with the
modules/include test crashing (but these passed
if run just by themselves).

Heh, ok so you are cheating here, the above code won't destroy a sub-pool, unless its parent pool is destroyed ;)


__________________________________________________________________
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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to