stas 2004/07/15 18:10:46
Modified: . Changes ModPerl-Registry/lib/ModPerl RegistryLoader.pm ModPerl-Registry/t/conf modperl_extra_startup.pl lib/Apache Status.pm compat.pm src/modules/perl modperl_util.c modperl_util.h t/conf modperl_extra.pl t/response/TestAPI server_util.pm t/response/TestCompat apache.pm xs/Apache/Connection Apache__Connection.h xs/Apache/RequestRec Apache__RequestRec.h xs/Apache/ServerUtil Apache__ServerUtil.h xs/maps apache_functions.map modperl_functions.map xs/tables/current/ModPerl FunctionTable.pm Log: - ($r|$c|$s)->server_root_relative were removed. Now only an explicit and somewhat deprecated function API remains: Apache::ServerUtil::server_root_relative($pool, $path); it's too easy to cause memory leak with this method, and it's inefficient as it duplicates the return value, to avoid potential segfaults if the pool it was allocated from gets destroyed and the value is attempted to be used. Instead of this method use the equivalent: File::Spec->catfile(Apache::ServerUtil::server_root, $fname); - adjust the core modules code not to use that method Revision Changes Path 1.418 +9 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.417 retrieving revision 1.418 diff -u -u -r1.417 -r1.418 --- Changes 15 Jul 2004 21:29:51 -0000 1.417 +++ Changes 16 Jul 2004 01:10:45 -0000 1.418 @@ -12,6 +12,15 @@ =item 1.99_15-dev +($r|$c|$s)->server_root_relative were removed. Now only an explicit +and somewhat deprecated function API remains: +Apache::ServerUtil::server_root_relative($pool, $path); it's too easy +to cause memory leak with this method, and it's inefficient as it +duplicates the return value, to avoid potential segfaults if the pool +it was allocated from gets destroyed and the value is attempted to be +used. Instead of this method use the equivalent: +File::Spec->catfile(Apache::ServerUtil::server_root, $fname); [Stas] + $r->psignature now lives in the package it belongs to: Apache::RequestUtil (previously lived in Apache::ServerUtil). [Stas] 1.11 +6 -2 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm Index: RegistryLoader.pm =================================================================== RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryLoader.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -u -r1.10 -r1.11 --- RegistryLoader.pm 4 Mar 2004 06:01:05 -0000 1.10 +++ RegistryLoader.pm 16 Jul 2004 01:10:45 -0000 1.11 @@ -18,10 +18,13 @@ use warnings; use ModPerl::RegistryCooker (); +use Apache::ServerUtil (); use APR::Pool (); -use Apache::Const -compile => qw(OK HTTP_OK OPT_EXECCGI); use Carp; +use File::Spec (); + +use Apache::Const -compile => qw(OK HTTP_OK OPT_EXECCGI); our @ISA = (); @@ -68,7 +71,8 @@ $self->warn("Trying to guess filename based on uri") if $self->{debug}; - $filename = Apache::server_root_relative($self->{pool}, $guess); + $filename = File::Spec->catfile(Apache::ServerUtil::server_root, + $guess); unless (-e $filename) { $self->warn("Cannot find guessed file: $filename", "provide \$filename or 'trans' sub"); 1.18 +5 -4 modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl Index: modperl_extra_startup.pl =================================================================== RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl,v retrieving revision 1.17 retrieving revision 1.18 diff -u -u -r1.17 -r1.18 --- modperl_extra_startup.pl 9 Jul 2004 08:01:20 -0000 1.17 +++ modperl_extra_startup.pl 16 Jul 2004 01:10:45 -0000 1.18 @@ -5,14 +5,15 @@ use APR::Error; use ModPerl::RegistryLoader (); + use Apache::ServerRec (); use Apache::ServerUtil (); -use Apache::Process (); +use File::Spec (); use DirHandle (); -my $pool = Apache->server->process->pool; -my $base_dir = Apache::ServerRec::server_root_relative($pool, "cgi-bin"); +my $base_dir = File::Spec->catdir(Apache::ServerUtil::server_root, + "cgi-bin"); # test the scripts pre-loading by explicitly specifying uri => filename my $rl = ModPerl::RegistryLoader->new(package => "ModPerl::Registry"); @@ -29,7 +30,7 @@ sub trans { my $uri = shift; $uri =~ s|^/registry_bb/|cgi-bin/|; - return Apache::ServerRec::server_root_relative($pool, $uri); + return File::Spec->catdir(Apache::ServerUtil::server_root, $uri); } my $rl = ModPerl::RegistryLoader->new( 1.27 +2 -2 modperl-2.0/lib/Apache/Status.pm Index: Status.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/Status.pm,v retrieving revision 1.26 retrieving revision 1.27 diff -u -u -r1.26 -r1.27 --- Status.pm 15 Jul 2004 20:52:38 -0000 1.26 +++ Status.pm 16 Jul 2004 01:10:45 -0000 1.27 @@ -704,8 +704,8 @@ untie *STDOUT; - my $dir = - $r->server_root_relative($r->dir_config("GraphDir") || "logs/b_graphs"); + my $dir = File::Spec->catfile(Apache::ServerUtil::server_root, + ($r->dir_config("GraphDir") || "logs/b_graphs")); mkdir $dir, 0755 unless -d $dir; 1.113 +14 -17 modperl-2.0/lib/Apache/compat.pm Index: compat.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.112 retrieving revision 1.113 diff -u -u -r1.112 -r1.113 --- compat.pm 15 Jul 2004 20:52:38 -0000 1.112 +++ compat.pm 16 Jul 2004 01:10:45 -0000 1.113 @@ -34,15 +34,15 @@ # PerlResponseHandler Apache::Registry #</Location> -use Apache::RequestRec (); -use Apache::SubRequest (); use Apache::Connection (); use Apache::ServerRec (); use Apache::ServerUtil (); use Apache::Access (); +use Apache::RequestRec (); use Apache::RequestIO (); use Apache::RequestUtil (); use Apache::Response (); +use Apache::SubRequest (); use Apache::Util (); use Apache::Log (); use Apache::URI (); @@ -54,7 +54,9 @@ use APR::Brigade (); use APR::Bucket (); use mod_perl (); + use Symbol (); +use File::Spec (); BEGIN { $INC{'Apache.pm'} = __FILE__; @@ -155,21 +157,6 @@ } EOI - 'Apache::server_root_relative' => <<'EOI', -{ - require Apache::ServerRec; - require Apache::ServerUtil; - - my $orig_sub = *Apache::ServerRec::server_root_relative{CODE}; - *Apache::server_root_relative = sub { - my $class = shift; - return Apache->server->server_root_relative(@_); - }; - $orig_sub; -} - -EOI - 'Apache::Util::ht_time' => <<'EOI', { require Apache::Util; @@ -260,6 +247,11 @@ package Apache; +sub server_root_relative { + my $class = shift; + File::Spec->catfile(Apache::ServerUtil::server_root, @_); +} + sub exit { require ModPerl::Util; @@ -510,6 +502,11 @@ return $data unless wantarray; return $r->parse_args($data); +} + +sub server_root_relative { + my $r = shift; + File::Spec->catfile(Apache::ServerUtil::server_root, @_); } sub clear_rgy_endav { 1.74 +0 -98 modperl-2.0/src/modules/perl/modperl_util.c Index: modperl_util.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -u -r1.73 -r1.74 --- modperl_util.c 9 Jul 2004 08:01:20 -0000 1.73 +++ modperl_util.c 16 Jul 2004 01:10:45 -0000 1.74 @@ -179,80 +179,6 @@ return sv; } -static apr_pool_t *modperl_sv2pool(pTHX_ SV *obj, CV *method) -{ - apr_pool_t *p = NULL; - char *classname = NULL; - IV ptr = 0; - - if ((SvROK(obj) && (SvTYPE(SvRV(obj)) == SVt_PVMG))) { - /* standard classes */ - classname = SvCLASS(obj); - ptr = SvObjIV(obj); - } - else if ((SvROK(obj) && (SvTYPE(SvRV(obj)) == SVt_PVHV))) { - /* Apache::RequestRec subclass */ - classname = SvCLASS(obj); - ptr = SvIV(modperl_hv_request_find(aTHX_ obj, classname, method)); - - /* if modperl_hv_request_find succeeeds then the class is an - * Apache::RequestRec subclass (the only subclass we support). - * so, fake things a bit so we can dig out the proper pool below - */ - classname = "Apache::RequestRec"; - } - else { - MP_TRACE_m(MP_FUNC, "SV not a recognized object"); - return NULL; - } - - if (strnEQ(classname, "APR::", 5)) { - classname += 5; - switch (*classname) { - case 'P': - if (strEQ(classname, "Pool")) { - p = (apr_pool_t *)SvObjIV(obj); - } - break; - default: - MP_TRACE_m(MP_FUNC, "class %s not recognized", classname); - break; - }; - } - else if (strnEQ(classname, "Apache::", 8)) { - classname += 8; - switch (*classname) { - case 'C': - if (strEQ(classname, "Connection")) { - p = ((conn_rec *)ptr)->pool; - } - break; - case 'R': - if (strEQ(classname, "RequestRec")) { - p = ((request_rec *)ptr)->pool; - } - break; - case 'S': - if (strEQ(classname, "ServerRec")) { - p = ((server_rec *)ptr)->process->pconf; - } - break; - default: - MP_TRACE_m(MP_FUNC, "class %s not recognised", classname); - break; - }; - } - else { - MP_TRACE_m(MP_FUNC, "class %s not recognised", classname); - } - - if (p == NULL) { - MP_TRACE_m(MP_FUNC, "unable to derive pool from object"); - } - - return p; -} - int modperl_errsv(pTHX_ int status, request_rec *r, server_rec *s) { SV *sv = ERRSV; @@ -710,30 +636,6 @@ } return package; -} - -/* this is used across server_root_relative() in the - * Apache, Apache::ServerRec, Apache::RequestRec, and - * Apache::Connection classes - */ -SV *modperl_server_root_relative(pTHX_ SV *sv, const char *fname) -{ - apr_pool_t *p; - - if (!sv_isobject(sv)) { - Perl_croak(aTHX_ "usage: Apache::server_root_relative(obj, name)"); - } - - p = modperl_sv2pool(aTHX_ sv, get_cv("Apache::server_root_relative", 0)); - - if (p == NULL) { - MP_TRACE_a(MP_FUNC, - "unable to isolate pool for ap_server_root_relative()"); - return &PL_sv_undef; - } - - /* copy the SV in case the pool goes out of scope before the perl scalar */ - return newSVpv(ap_server_root_relative(p, fname), 0); } char *modperl_coderef2text(pTHX_ apr_pool_t *p, CV *cv) 1.64 +0 -2 modperl-2.0/src/modules/perl/modperl_util.h Index: modperl_util.h =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v retrieving revision 1.63 retrieving revision 1.64 diff -u -u -r1.63 -r1.64 --- modperl_util.h 22 Jun 2004 22:34:10 -0000 1.63 +++ modperl_util.h 16 Jul 2004 01:10:45 -0000 1.64 @@ -96,8 +96,6 @@ char *modperl_file2package(apr_pool_t *p, const char *file); -SV *modperl_server_root_relative(pTHX_ SV *sv, const char *fname); - /** * convert a compiled *CV ref to its original source code * @param p pool object (with a shortest possible life scope) 1.58 +1 -1 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl =================================================================== RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.57 retrieving revision 1.58 diff -u -u -r1.57 -r1.58 --- modperl_extra.pl 15 Jul 2004 19:32:36 -0000 1.57 +++ modperl_extra.pl 16 Jul 2004 01:10:46 -0000 1.58 @@ -19,7 +19,7 @@ # perl core libs my $pool = Apache->server->process->pool; my $project_root = canonpath - Apache::ServerRec::server_root_relative($pool, ".."); + Apache::ServerUtil::server_root_relative($pool, ".."); my (@a, @b, @c); for (@INC) { if (m|^\Q$project_root\E|) { 1.25 +54 -70 modperl-2.0/t/response/TestAPI/server_util.pm Index: server_util.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/server_util.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -u -r1.24 -r1.25 --- server_util.pm 15 Jul 2004 20:52:38 -0000 1.24 +++ server_util.pm 16 Jul 2004 01:10:46 -0000 1.25 @@ -27,28 +27,9 @@ } sub handler { - my $r = shift; - my %pools = ( - '$r->pool' => $r->pool, - '$r->connection->pool' => $r->connection->pool, - '$r->server->process->pool' => $r->server->process->pool, - '$r->server->process->pconf' => $r->server->process->pconf, - 'Apache->server->process->pconf' => Apache->server->process->pconf, - 'APR::Pool->new' => APR::Pool->new, - ); - - my %objects = ( - '$r' => $r, - '$r->connection' => $r->connection, - '$r->server' => $r->server, - '__PACKAGE__->new($r)' => __PACKAGE__->new($r), - ); - - plan $r, tests => 12 + - (scalar keys %pools) + - (scalar keys %objects); + plan $r, tests => 15; { my $s = $r->server; @@ -58,79 +39,82 @@ ok t_cmp(scalar(@handlers), scalar(@expected), "get_handlers"); } - # syntax - an object or pool is required - t_debug("Apache::server_root_relative() died"); - eval { my $dir = Apache::server_root_relative() }; - t_debug("\$\@: $@"); - ok $@; + t_debug('Apache::ServerUtil::exists_config_define'); + ok Apache::ServerUtil::exists_config_define('MODPERL2'); + ok ! Apache::ServerUtil::exists_config_define('FOO'); - t_debug("Apache->server_root_relative() died"); - eval { my $dir = Apache->server_root_relative() }; - ok $@; + t_debug('registering method FOO'); + ok $r->server->method_register('FOO'); - # syntax - first argument must be an object, not a class - t_debug("Apache->server_root_relative('conf') died"); - eval { my $dir = Apache->server_root_relative('conf') }; - ok $@; + server_root_relative_tests($r); - foreach my $p (keys %pools) { + Apache::OK; +} - ok t_filepath_cmp( - canonpath(Apache::server_root_relative($pools{$p},'conf')), - catfile($serverroot, 'conf'), - "Apache:::server_root_relative($p, 'conf')"); - } - # dig out the pool from valid objects - foreach my $obj (keys %objects) { +# 11 sub-tests +sub server_root_relative_tests { + my $r = shift; + my %pools = ( + '$r->pool' => $r->pool, + '$r->connection->pool' => $r->connection->pool, + '$r->server->process->pool' => $r->server->process->pool, + '$r->server->process->pconf' => $r->server->process->pconf, + 'Apache->server->process->pconf' => Apache->server->process->pconf, + 'APR::Pool->new' => APR::Pool->new, + ); + + # syntax - an object or pool is required + t_debug("Apache::ServerUtil::server_root_relative() died"); + eval { my $dir = Apache::ServerUtil::server_root_relative() }; + t_debug("\$\@: $@"); + ok $@; + + foreach my $p (keys %pools) { + # we will leak memory here when calling the function with a + # pool whose life is longer than of $r, but it doesn't matter + # for the test ok t_filepath_cmp( - canonpath($objects{$obj}->server_root_relative('conf')), + canonpath(Apache::ServerUtil::server_root_relative($pools{$p}, + 'conf')), catfile($serverroot, 'conf'), - "$obj->server_root_relative('conf')"); + "Apache::ServerUtil:::server_root_relative($p, 'conf')"); } # syntax - unrecognized objects don't segfault { my $obj = bless {}, 'Apache::Foo'; - eval { Apache::server_root_relative($obj, 'conf') }; + eval { Apache::ServerUtil::server_root_relative($obj, 'conf') }; ok t_cmp($@, - qr/server_root_relative.*no .* key/, - "Apache::server_root_relative(\$obj, 'conf')"); + qr/p is not of type APR::Pool/, + "Apache::ServerUtil::server_root_relative(\$obj, 'conf')"); } # no file argument gives ServerRoot - ok t_filepath_cmp(canonpath($r->server_root_relative), - canonpath($serverroot), - '$r->server_root_relative()'); - - ok t_filepath_cmp(canonpath(Apache::server_root_relative($r->pool)), - canonpath($serverroot), - 'Apache::server_root_relative($r->pool)'); - - # Apache::server_root is also the ServerRoot constant - ok t_filepath_cmp(canonpath(Apache::ServerUtil::server_root), - canonpath($r->server_root_relative), - 'Apache::ServerUtil::server_root'); - { - # absolute paths should resolve to themselves - my $dir = $r->server_root_relative('logs'); + my $server_root_relative = + Apache::ServerUtil::server_root_relative($r->pool); - ok t_filepath_cmp($r->server_root_relative($dir), - $dir, - "\$r->server_root_relative($dir)"); - } + ok t_filepath_cmp(canonpath($server_root_relative), + canonpath($serverroot), + 'server_root_relative($pool)'); + + # Apache::ServerUtil::server_root is also the ServerRoot constant + ok t_filepath_cmp(canonpath(Apache::ServerUtil::server_root), + canonpath($server_root_relative), + 'Apache::ServerUtil::server_root'); - t_debug('Apache::ServerUtil::exists_config_define'); - ok Apache::ServerUtil::exists_config_define('MODPERL2'); - ok ! Apache::ServerUtil::exists_config_define('FOO'); + } - t_debug('registering method FOO'); - ok $r->server->method_register('FOO'); + { + # absolute paths should resolve to themselves + my $dir1 = Apache::ServerUtil::server_root_relative($r->pool, 'logs'); + my $dir2 = Apache::ServerUtil::server_root_relative($r->pool, $dir1); - Apache::OK; + ok t_filepath_cmp($dir1, $dir2, "absolute path"); + } } 1; 1.16 +15 -18 modperl-2.0/t/response/TestCompat/apache.pm Index: apache.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -u -r1.15 -r1.16 --- apache.pm 15 Jul 2004 20:36:29 -0000 1.15 +++ apache.pm 16 Jul 2004 01:10:46 -0000 1.16 @@ -64,31 +64,28 @@ 'Apache->httpd_conf'); Apache->httpd_conf("ServerAdmin $admin"); - ok t_filepath_cmp(canonpath(Apache::Test::config()->{vars}->{serverroot}), - canonpath($Apache::Server::CWD), - '$Apache::Server::CWD'); - - ok t_filepath_cmp(canonpath($r->server_root_relative), - canonpath($Apache::Server::CWD), - '$r->server_root_relative()'); - - ok t_filepath_cmp(canonpath($r->server_root_relative('conf')), - catfile($Apache::Server::CWD, 'conf'), - "\$r->server_root_relative('conf')"); - - # Apache->server_root_relative + # (Apache||$r)->server_root_relative { - Apache::compat::override_mp2_api('Apache::server_root_relative'); + my $server_root = Apache::Test::config()->{vars}->{serverroot}; + ok t_filepath_cmp(canonpath($Apache::Server::CWD), + canonpath($server_root), + '$server_root'); + + ok t_filepath_cmp(canonpath($r->server_root_relative), + canonpath($server_root), + '$r->server_root_relative()'); + + ok t_filepath_cmp(canonpath($r->server_root_relative('conf')), + catfile($server_root, 'conf'), + "\$r->server_root_relative('conf')"); ok t_filepath_cmp(canonpath(Apache->server_root_relative('conf')), - catfile($Apache::Server::CWD, 'conf'), + catfile($server_root, 'conf'), "Apache->server_root_relative('conf')"); ok t_filepath_cmp(canonpath(Apache->server_root_relative), - canonpath($Apache::Server::CWD), + canonpath($server_root), 'Apache->server_root_relative()'); - - Apache::compat::restore_mp2_api('Apache::server_root_relative'); } OK; 1.10 +0 -2 modperl-2.0/xs/Apache/Connection/Apache__Connection.h Index: Apache__Connection.h =================================================================== RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -u -r1.9 -r1.10 --- Apache__Connection.h 4 Mar 2004 06:01:12 -0000 1.9 +++ Apache__Connection.h 16 Jul 2004 01:10:46 -0000 1.10 @@ -40,5 +40,3 @@ return ap_get_remote_host(c, (void *)dir_config, type, NULL); } -#define mpxs_Apache__Connection_server_root_relative(sv, fname) \ - modperl_server_root_relative(aTHX_ sv, fname) 1.15 +0 -3 modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h Index: Apache__RequestRec.h =================================================================== RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -u -r1.14 -r1.15 --- Apache__RequestRec.h 24 May 2004 19:56:52 -0000 1.14 +++ Apache__RequestRec.h 16 Jul 2004 01:10:46 -0000 1.15 @@ -84,9 +84,6 @@ return &r->finfo; } -#define mpxs_Apache__RequestRec_server_root_relative(sv, fname) \ - modperl_server_root_relative(aTHX_ sv, fname) - static MP_INLINE const char *mpxs_Apache__RequestRec_handler(pTHX_ I32 items, SV **MARK, SV **SP) 1.23 +9 -7 modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h Index: Apache__ServerUtil.h =================================================================== RCS file: /home/cvs/modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -u -r1.22 -r1.23 --- Apache__ServerUtil.h 15 Jul 2004 20:52:38 -0000 1.22 +++ Apache__ServerUtil.h 16 Jul 2004 01:10:46 -0000 1.23 @@ -60,14 +60,16 @@ #define mpxs_Apache__ServerRec_dir_config(s, key, sv_val) \ modperl_dir_config(aTHX_ NULL, s, key, sv_val) -#define mpxs_Apache_server(classname) \ -modperl_global_get_server_rec() +#define mpxs_Apache_server(classname) modperl_global_get_server_rec() -#define mpxs_Apache__ServerRec_server_root_relative(sv, fname) \ - modperl_server_root_relative(aTHX_ sv, fname); - -#define mpxs_Apache_server_root_relative(sv, fname) \ - modperl_server_root_relative(aTHX_ sv, fname); +static MP_INLINE +SV *mpxs_Apache__ServerUtil_server_root_relative(pTHX_ apr_pool_t *p, + const char *fname) +{ + /* copy the SV in case the pool goes out of scope before the perl + * scalar */ + return newSVpv(ap_server_root_relative(p, fname), 0); +} static MP_INLINE int mpxs_Apache__ServerRec_is_perl_option_enabled(pTHX_ server_rec *s, 1.90 +1 -0 modperl-2.0/xs/maps/apache_functions.map Index: apache_functions.map =================================================================== RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v retrieving revision 1.89 retrieving revision 1.90 diff -u -u -r1.89 -r1.90 --- apache_functions.map 15 Jul 2004 21:29:51 -0000 1.89 +++ apache_functions.map 16 Jul 2004 01:10:46 -0000 1.90 @@ -178,6 +178,7 @@ ~ap_server_root ~ap_server_root_relative + MODULE=Apache::Connection PACKAGE=guess #XXX: thought this might be useful for protocol modules #however it is not exported on win32 1.79 +3 -4 modperl-2.0/xs/maps/modperl_functions.map Index: modperl_functions.map =================================================================== RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v retrieving revision 1.78 retrieving revision 1.79 diff -u -u -r1.78 -r1.79 --- modperl_functions.map 12 Jul 2004 08:17:09 -0000 1.78 +++ modperl_functions.map 16 Jul 2004 01:10:46 -0000 1.79 @@ -20,7 +20,6 @@ mpxs_Apache__RequestRec_proxyreq | | r, val=Nullsv mpxs_Apache__RequestRec_subprocess_env | | r, key=NULL, val=Nullsv mpxs_Apache__RequestRec_finfo | | r, finfo=NULL - SV *:DEFINE_server_root_relative | | SV *:p, const char *:fname="" mpxs_Apache__RequestRec_handler | | ... @@ -79,15 +78,15 @@ MODULE=Apache::ServerUtil PACKAGE=Apache::ServerRec SV *:DEFINE_dir_config | | server_rec *:s, char *:key=NULL, SV *:sv_val=Nullsv - SV *:DEFINE_server_root_relative | | SV *:p, const char *:fname="" + +MODULE=Apache::ServerUtil PACKAGE=Apache::ServerUtil + mpxs_Apache__ServerUtil_server_root_relative | | p, fname=NULL PACKAGE=Apache server_rec *:DEFINE_server | | SV *:classname=Nullsv - SV *:DEFINE_server_root_relative | | SV *:p, const char *:fname="" MODULE=Apache::Connection mpxs_Apache__Connection_client_socket | | c, s=NULL - SV *:DEFINE_server_root_relative | | SV *:p, const char *:fname="" MODULE=Apache::Filter modperl_filter_attributes | MPXS_ | ... | MODIFY_CODE_ATTRIBUTES 1.173 +19 -19 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.172 retrieving revision 1.173 diff -u -u -r1.172 -r1.173 --- FunctionTable.pm 15 Jul 2004 06:23:21 -0000 1.172 +++ FunctionTable.pm 16 Jul 2004 01:10:46 -0000 1.173 @@ -2,7 +2,7 @@ # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # ! WARNING: generated by ModPerl::ParseSource/0.01 -# ! Wed Jul 14 22:25:32 2004 +# ! Thu Jul 15 16:55:01 2004 # ! do NOT edit, any changes will be lost ! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -4417,24 +4417,6 @@ 'args' => [] }, { - 'return_type' => 'SV *', - 'name' => 'modperl_server_root_relative', - 'args' => [ - { - 'type' => 'PerlInterpreter *', - 'name' => 'my_perl' - }, - { - 'type' => 'SV *', - 'name' => 'sv' - }, - { - 'type' => 'const char *', - 'name' => 'fname' - } - ] - }, - { 'return_type' => 'void', 'name' => 'modperl_set_perl_module_config', 'args' => [ @@ -6803,6 +6785,24 @@ { 'type' => 'PerlInterpreter *', 'name' => 'my_perl' + } + ] + }, + { + 'return_type' => 'SV *', + 'name' => 'mpxs_Apache__ServerUtil_server_root_relative', + 'args' => [ + { + 'type' => 'PerlInterpreter *', + 'name' => 'my_perl' + }, + { + 'type' => 'apr_pool_t *', + 'name' => 'p' + }, + { + 'type' => 'const char *', + 'name' => 'fname' } ] },