Stas Bekman wrote:
Geoffrey Young wrote:

ither way is good, just trying to put new features to stress ;)


also will this call destroy on $p on the exit from { } ?


{
    my $p = APR::Pool->new;
}

I think it should.



so do I, but it doesn't. you can't call $p->DESTROY either, even though the alias is there in APR__Pool.h


so it's broken.

well...



I fixed things so that DESTROY was available, but it caused all kinds of problems with the test suite, so I'm guessing it's a good thing that pools need to be explicitly destroyed.


what problems?

all kinds of problems. like random modules in the test suite start to fail or hang. unless I got the fix wrong (below), but it was the only way I could see to create the method, since the #define clearly isn't working (which is interesting, since there are two other classes that only use the alias as well).


it's just an object, I suppose that it should just work.

well, maybe. if we go destroying major pools (request, server) before it's time that could be bad. and if $r->pool is paired to an APR::Pool object, and $r goes out of scope, that would call APR::Pool::DESTROY, right?


--Geoff

Index: xs/maps/apr_functions.map
===================================================================
RCS file: /home/cvspublic/modperl-2.0/xs/maps/apr_functions.map,v
retrieving revision 1.57
diff -u -r1.57 apr_functions.map
--- xs/maps/apr_functions.map 4 Sep 2003 16:39:44 -0000 1.57
+++ xs/maps/apr_functions.map 5 Sep 2003 19:27:00 -0000
@@ -155,6 +155,7 @@
apr_pool_clear
>apr_pool_clear_debug
apr_pool_destroy
+ apr_pool_DESTROY
>apr_pool_destroy_debug
apr_pool_t *:DEFINE_new | mpxs_apr_pool_create | SV *:obj
-apr_pool_create_ex
cvs server: Diffing xs/tables
cvs server: Diffing xs/tables/current
cvs server: Diffing xs/tables/current/Apache
Index: xs/tables/current/Apache/FunctionTable.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
retrieving revision 1.47
diff -u -r1.47 FunctionTable.pm
--- xs/tables/current/Apache/FunctionTable.pm 29 Aug 2003 14:31:00 -0000 1.47
+++ xs/tables/current/Apache/FunctionTable.pm 5 Sep 2003 19:27:08 -0000
@@ -10040,6 +10040,16 @@
},
{
'return_type' => 'void',
+ 'name' => 'apr_pool_DESTROY',
+ 'args' => [
+ {
+ 'type' => 'apr_pool_t *',
+ 'name' => 'p'
+ }
+ ]
+ },
+ {
+ 'return_type' => 'void',
'name' => 'apr_pool_destroy_debug',
'args' => [
{



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



Reply via email to