Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Stas Bekman
Stas Bekman wrote: I've rebuit with --enable-pool-debug CPPFLAGS="-DAPR_BUCKET_DEBUG", but also apr1/httpd2.1 % ~/perl/5.8.x/bin/perl -MApache2 -MAPR::Pool -MAPR::Table -wle ' $t= APR::Table::make(APR::Pool->new, 10); $t->set($_=>$_), print "Set $_" for 1..20' Segmentation fault Now I

Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Stas Bekman
+static MP_INLINE SV *mpxs_APR__Table_make(pTHX_ SV *p_sv, int nelts) +{ +apr_pool_t *p = mp_xs_sv2_APR__Pool(p_sv); +apr_table_t *t = apr_table_make(p, nelts); +SV *t_sv = modperl_hash_tie(aTHX_ "APR::Table", Nullsv, t); +sv_magic(SvRV(t_sv), p_sv, PERL_MAGIC_ext, Nullch, -1); +

Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Stas Bekman
Stas Bekman wrote: +static MP_INLINE SV *mpxs_APR__Table_make(pTHX_ SV *p_sv, int nelts) +{ +apr_pool_t *p = mp_xs_sv2_APR__Pool(p_sv); +apr_table_t *t = apr_table_make(p, nelts); +SV *t_sv = modperl_hash_tie(aTHX_ "APR::Table", Nullsv, t); +sv_magic(SvRV(t_sv), p_sv, PERL_MAGIC_ext

Re: svn commit: r122674 - /perl/modperl/trunk/Changes /perl/modperl/trunk/lib/Apache/Status.pm

2004-12-17 Thread Geoffrey Young
> -my $dir = File::Spec->catfile(Apache::ServerUtil::server_root, > +my $dir = File::Spec->catfile(Apache::ServerUtil::server_root(), this strikes me as odd - Apache::ServerUtil::server_root is inserted into the Apache::ServerUtil namespace as a constant subroutine and we use Apache::Serv

Re: svn commit: r122674 - /perl/modperl/trunk/Changes /perl/modperl/trunk/lib/Apache/Status.pm

2004-12-17 Thread Stas Bekman
Geoffrey Young wrote: -my $dir = File::Spec->catfile(Apache::ServerUtil::server_root, +my $dir = File::Spec->catfile(Apache::ServerUtil::server_root(), this strikes me as odd - Apache::ServerUtil::server_root is inserted into the Apache::ServerUtil namespace as a constant subroutine and we

Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: >> +static MP_INLINE SV *mpxs_APR__Table_make(pTHX_ SV *p_sv, int nelts) >> +{ >> +apr_pool_t *p = mp_xs_sv2_APR__Pool(p_sv); >> +apr_table_t *t = apr_table_make(p, nelts); >> +SV *t_sv = modperl_hash_tie(aTHX_ "APR::Table", Nullsv, t); >> +s

Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Stas Bekman
Joe Schaefer wrote: Stas Bekman <[EMAIL PROTECTED]> writes: +static MP_INLINE SV *mpxs_APR__Table_make(pTHX_ SV *p_sv, int nelts) +{ +apr_pool_t *p = mp_xs_sv2_APR__Pool(p_sv); +apr_table_t *t = apr_table_make(p, nelts); +SV *t_sv = modperl_hash_tie(aTHX_ "APR::Table", Nullsv, t); +

Re: [mp2] pools that go out of scope aren't a problem anymore?

2004-12-17 Thread Joe Schaefer
Stas Bekman <[EMAIL PROTECTED]> writes: [...] > in fact the only reason modperl_hash_tie calls sv_magic is to assign some > flags, may be it can be eliminated completely. I haven't looked at the other > places where it is used. Why do you think the order matters, if it doesn't > really use that