cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
randyk 2004/02/14 09:00:27 Modified:xs/tables/current/ModPerl FunctionTable.pm Log: add missing env functions to FunctionTable Revision ChangesPath 1.146 +19 -1 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- FunctionTable.pm 9 Feb 2004 19:32:43 - 1.145 +++ FunctionTable.pm 14 Feb 2004 17:00:26 - 1.146 @@ -1623,8 +1623,26 @@ }, { 'return_type' => 'void', -'name' => 'modperl_env_configure_request', +'name' => 'modperl_env_configure_request_srv', 'args' => [ + { +'type' => 'PerlInterpreter *', +'name' => 'my_perl' + }, + { +'type' => 'request_rec *', +'name' => 'r' + } +] + }, + { +'return_type' => 'void', +'name' => 'modperl_env_configure_request_dir', +'args' => [ + { +'type' => 'PerlInterpreter *', +'name' => 'my_perl' + }, { 'type' => 'request_rec *', 'name' => 'r'
cvs commit: modperl-2.0/src/modules/perl modperl_handler.c modperl_mgv.c
stas2004/02/14 11:23:05 Modified:src/modules/perl modperl_handler.c modperl_mgv.c Log: non-ithreaded perl fixes Revision ChangesPath 1.23 +2 -1 modperl-2.0/src/modules/perl/modperl_handler.c Index: modperl_handler.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -u -r1.22 -r1.23 --- modperl_handler.c 9 Feb 2004 20:35:26 - 1.22 +++ modperl_handler.c 14 Feb 2004 19:23:05 - 1.23 @@ -1,6 +1,6 @@ #include "mod_perl.h" - +#ifdef USE_ITHREADS static char *modperl_coderef2text(pTHX_ apr_pool_t *p, CV *cv) { @@ -58,6 +58,7 @@ return text; } +#endif modperl_handler_t *modperl_handler_new(apr_pool_t *p, const char *name) { 1.34 +5 -0 modperl-2.0/src/modules/perl/modperl_mgv.c Index: modperl_mgv.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -u -r1.33 -r1.34 --- modperl_mgv.c 11 Feb 2004 01:19:23 - 1.33 +++ modperl_mgv.c 14 Feb 2004 19:23:05 - 1.34 @@ -198,6 +198,11 @@ char *handler_name = "handler"; char *tmp; +if (MpHandlerANON(handler)) { +/* already resolved anonymous handler */ +return 1; +} + if (strnEQ(name, "sub ", 4)) { MP_TRACE_h(MP_FUNC, "handler is anonymous\n"); MpHandlerANON_On(handler);
cvs commit: modperl-2.0/xs/APR/Pool APR__Pool.h
stas2004/02/14 15:19:01 Modified:xs/APR/Pool APR__Pool.h Log: no need for the perl object in the pool accounting callback Revision ChangesPath 1.10 +1 -5 modperl-2.0/xs/APR/Pool/APR__Pool.h Index: APR__Pool.h === RCS file: /home/cvs/modperl-2.0/xs/APR/Pool/APR__Pool.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -u -r1.9 -r1.10 --- APR__Pool.h 31 Jan 2004 10:06:59 - 1.9 +++ APR__Pool.h 14 Feb 2004 23:19:01 - 1.10 @@ -2,7 +2,6 @@ typedef struct { SV *sv; -PerlInterpreter *perl; } mpxs_pool_account_t; /* XXX: this implementation has a problem with perl ithreads. if a @@ -44,7 +43,6 @@ MP_POOL_TRACE(MP_FUNC, "this pool seems to be destroyed already"); } else { -dTHXa(data->perl); MP_POOL_TRACE(MP_FUNC, "pool 0x%lx contains a valid sv 0x%lx, invalidating it", (unsigned long)data->sv, (unsigned long)cleanup_data); @@ -132,9 +130,7 @@ SV *rv = sv_setref_pv(NEWSV(0, 0), "APR::Pool", (void*)child_pool); data->sv = SvRV(rv); -#ifdef USE_ITHREADS -data->perl = aTHX; -#endif + MP_POOL_TRACE(MP_FUNC, "sub-pool p: 0x%lx, sv: 0x%lx, rv: 0x%lx", (unsigned long)child_pool, data->sv, rv);
cvs commit: modperl-2.0/t/hooks/TestHooks push_handlers_blessed.pm
stas2004/02/14 15:22:07 Modified:src/modules/perl modperl_handler.c t/filter both_str_req_add.t t/hooks .cvsignore push_handlers.t Added: t/hooks/TestHooks push_handlers_blessed.pm Log: - B::Deparse >= 0.61 is only available since 5.8.x, but unless a code ref is blessed it'll work with older B::Deparse as well. Adjust the code to require 0.61 only if the code ref is blessed. otherwise require 0.60. - add a blessed code ref test. Revision ChangesPath 1.24 +7 -4 modperl-2.0/src/modules/perl/modperl_handler.c Index: modperl_handler.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -u -r1.23 -r1.24 --- modperl_handler.c 14 Feb 2004 19:23:05 - 1.23 +++ modperl_handler.c 14 Feb 2004 23:22:06 - 1.24 @@ -8,12 +8,15 @@ int count; SV *bdeparse; char *text; - -/* B::Deparse >= 0.61 needed for blessed code references */ - + +/* B::Deparse >= 0.61 needed for blessed code references. + * 0.6 works fine for non-blessed code refs. + * notice that B::Deparse is not CPAN-updatable. + * 0.61 is available starting from 5.8.0 + */ load_module(PERL_LOADMOD_NOIMPORT, newSVpvn("B::Deparse", 10), -newSVnv(0.61)); +newSVnv(SvOBJECT((SV*)cv) ? 0.61 : 0.60)); ENTER; SAVETMPS; 1.4 +1 -1 modperl-2.0/t/filter/both_str_req_add.t Index: both_str_req_add.t === RCS file: /home/cvs/modperl-2.0/t/filter/both_str_req_add.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -u -r1.3 -r1.4 --- both_str_req_add.t9 Feb 2004 19:32:42 - 1.3 +++ both_str_req_add.t14 Feb 2004 23:22:06 - 1.4 @@ -5,7 +5,7 @@ use Apache::TestRequest; use Apache::TestUtil; -plan tests => 1; +plan tests => 1, have_min_module_version('B::Deparse', 0.6); my $data = join ' ', 'A'..'Z', 0..9; my $expected = lc $data; # that's what the input filter does 1.5 +2 -1 modperl-2.0/t/hooks/.cvsignore Index: .cvsignore === RCS file: /home/cvs/modperl-2.0/t/hooks/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- .cvsignore9 Feb 2004 19:08:35 - 1.4 +++ .cvsignore14 Feb 2004 23:22:07 - 1.5 @@ -5,4 +5,5 @@ fixup.t trans.t init.t -push_handlers_same_phase.t \ No newline at end of file +push_handlers_same_phase.t +push_handlers_blessed.t 1.5 +1 -1 modperl-2.0/t/hooks/push_handlers.t Index: push_handlers.t === RCS file: /home/cvs/modperl-2.0/t/hooks/push_handlers.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- push_handlers.t 9 Feb 2004 19:32:43 - 1.4 +++ push_handlers.t 14 Feb 2004 23:22:07 - 1.5 @@ -5,7 +5,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests => 1; +plan tests => 1, have_min_module_version('B::Deparse', 0.6); my @refs = qw(conf conf1 conf2 coderef full_coderef coderef1 coderef2 coderef3); 1.1 modperl-2.0/t/hooks/TestHooks/push_handlers_blessed.pm Index: push_handlers_blessed.pm === package TestHooks::push_handlers_blessed; # test that we # - can push and execute blessed anon handlers use strict; use warnings FATAL => 'all'; use Apache::RequestRec (); use Apache::RequestIO (); use Apache::RequestUtil (); use APR::Table (); use Apache::Test; use Apache::TestUtil; use Apache::Const -compile => qw(OK DECLINED); sub handler { my $r = shift; plan $r, tests => 1, have_min_module_version('B::Deparse', 0.61);; my $sub = sub { ok 1; return Apache::OK; }; my $handler = bless $sub, __PACKAGE__; $r->push_handlers(PerlResponseHandler => $handler); return Apache::DECLINED; } 1; __DATA__ SetHandler modperl PerlResponseHandler TestHooks::push_handlers_blessed