perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
Date Wed, 25 Aug 2004 22:32:02 GMT
gozer       2004/08/25 15:32:02

  Modified:    .        Changes
               t/response/TestAPI uri.pm
               todo     release
               xs/APR/URI APR__URI.h
               xs/maps  apr_functions.map
               xs/tables/current/ModPerl FunctionTable.pm
  Log:
  Added APR::URI->rpath method. Returns the path of an uri minus
  path_info, if any.
  
  Revision  Changes    Path
  1.470     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.469
  retrieving revision 1.470
  diff -u -r1.469 -r1.470
  --- Changes	25 Aug 2004 21:51:18 -0000	1.469
  +++ Changes	25 Aug 2004 22:31:58 -0000	1.470
  @@ -12,6 +12,9 @@
   
   =item 1.99_17-dev
   
  +Added APR::URI->rpath method. Returns the path of an uri minus
  +path_info, if any. [Gozer]
  +
   moved Apache::current_callback() to ModPerl::Util::current_callback
   where it belongs [Gozer]
   
  
  
  
  1.18      +6 -1      modperl-2.0/t/response/TestAPI/uri.pm
  
  Index: uri.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/uri.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- uri.pm	8 Jul 2004 05:29:42 -0000	1.17
  +++ uri.pm	25 Aug 2004 22:31:59 -0000	1.18
  @@ -20,7 +20,7 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 22;
  +    plan $r, tests => 24;
   
       $r->args('query');
   
  @@ -146,13 +146,18 @@
   
           # new request
           $newr->parse_uri($url_string);
  +        $newr->path_info('/bar');
           ok t_cmp($newr->uri, $path, "uri");
           ok t_cmp($newr->args, $query, "args");
  +        ok t_cmp($newr->path_info, '/bar', "path_info");
   
           my $puri = $newr->parsed_uri;
           ok t_cmp($puri->path,     $path,     "path");
           ok t_cmp($puri->query,    $query,    "query");
           ok t_cmp($puri->fragment, $fragment, "fragment");
  +        
  +        #rpath
  +        ok t_cmp($puri->rpath, '/foo', "rpath");
   
           my $port = 6767;
           $puri->port($port);
  
  
  
  1.53      +0 -2      modperl-2.0/todo/release
  
  Index: release
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/todo/release,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- release	25 Aug 2004 21:51:20 -0000	1.52
  +++ release	25 Aug 2004 22:31:59 -0000	1.53
  @@ -8,8 +8,6 @@
     should be rewritten to clearly explain how to build static and
     dynamic mod_perl (each separately).
   
  -* APR::URI missing $uri->rpath (was in mp1)
  -
   * check other todo/features_missing items (some of them might be
     critical for 2.0 release, since missing methods might be a problem
     for migration)
  
  
  
  1.9       +20 -0     modperl-2.0/xs/APR/URI/APR__URI.h
  
  Index: APR__URI.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/URI/APR__URI.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- APR__URI.h	28 May 2004 01:36:40 -0000	1.8
  +++ APR__URI.h	25 Aug 2004 22:32:00 -0000	1.9
  @@ -70,3 +70,23 @@
       return port_str;
   }
   
  +static MP_INLINE
  +SV *mpxs_APR__URI_rpath(pTHX_ apr_uri_t *apr_uri)
  +{
  +    modperl_uri_t *uri = (modperl_uri_t *)apr_uri;
  +    
  +    if(uri->path_info) {
  +        int uri_len = strlen(uri->uri.path);
  +        int n = strlen(uri->path_info);
  +        int set = uri_len - n;
  +        if (set > 0) {
  +            return newSVpv(uri->uri.path, set);
  +        }
  +    }
  +    else {
  +        if (uri->uri.path) {
  +            return newSVpv(uri->uri.path, 0);
  +        }
  +    }
  +    return Nullsv;
  +}
  
  
  
  1.85      +1 -0      modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- apr_functions.map	20 Aug 2004 21:11:00 -0000	1.84
  +++ apr_functions.map	25 Aug 2004 22:32:01 -0000	1.85
  @@ -582,6 +582,7 @@
                     uptr, flags=APR_URI_UNP_OMITPASSWORD | unparse
    #special case to set both uri->port and uri->port_str
    mpxs_APR__URI_port | | uri, portsv=Nullsv
  + mpxs_APR__URI_rpath
    apr_uri_port_of_scheme
   
   !MODULE=Apache::XML
  
  
  
  1.176     +15 -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.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- FunctionTable.pm	22 Aug 2004 20:47:37 -0000	1.175
  +++ FunctionTable.pm	25 Aug 2004 22:32:01 -0000	1.176
  @@ -2,7 +2,7 @@
   
   # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !          Fri Aug 20 12:01:12 2004
  +# !          Wed Aug 25 14:56:13 2004
   # !          do NOT edit, any changes will be lost !
   # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   
  @@ -5708,6 +5708,20 @@
         {
           'type' => 'SV *',
           'name' => 'portsv'
  +      }
  +    ]
  +  },
  +  {
  +    'return_type' => 'SV *',
  +    'name' => 'mpxs_APR__URI_rpath',
  +    'args' => [
  +      {
  +        'type' => 'PerlInterpreter *',
  +        'name' => 'my_perl'
  +      },
  +      {
  +        'type' => 'apr_uri_t *',
  +        'name' => 'apr_uri'
         }
       ]
     },
  
  
  

Mime
View raw message