perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/xs/maps apache_functions.map apache_types.map
Date Wed, 04 Apr 2001 17:12:08 GMT
dougm       01/04/04 10:12:08

  Modified:    lib/ModPerl FunctionMap.pm WrapXS.pm
               src/modules/perl modperl_types.h
               xs/maps  apache_functions.map apache_types.map
  Added:       t/response/TestAPI lookup_uri.pm
  Log:
  get subrequest api working and add a little test for lookup_uri
  
  Revision  Changes    Path
  1.5       +3 -0      modperl-2.0/lib/ModPerl/FunctionMap.pm
  
  Index: FunctionMap.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/FunctionMap.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionMap.pm	2001/03/16 02:29:41	1.4
  +++ FunctionMap.pm	2001/04/04 17:12:07	1.5
  @@ -134,6 +134,9 @@
               unless ($package eq 'guess') {
                   $cur{CLASS} = $package;
               }
  +            if ($cur{ISA}) {
  +                $self->{isa}->{ $cur{MODULE} }->{$package} = delete $cur{ISA};
  +            }
           }
           else {
               $cur{CLASS} = $cur{MODULE};
  
  
  
  1.4       +20 -1     modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WrapXS.pm	2001/03/13 07:09:28	1.3
  +++ WrapXS.pm	2001/04/04 17:12:07	1.4
  @@ -334,6 +334,23 @@
       $class_prefix . $name;
   }
   
  +sub isa_str {
  +    my($self, $module) = @_;
  +    my $str = "";
  +
  +    if (my $isa = $self->typemap->{function_map}->{isa}->{$module}) {
  +        while (my($sub, $base) = each %$isa) {
  +#XXX cannot set isa in the BOOT: section because XSLoader local-ises
  +#ISA during bootstrap
  +#            $str .= qq{    av_push(get_av("$sub\::ISA", TRUE),
  +#                                   newSVpv("$base",0));}
  +            $str .= qq{\@$sub\::ISA = '$base';\n}
  +        }
  +    }
  +
  +    $str;
  +}
  +
   sub write_xs {
       my($self, $module, $functions) = @_;
   
  @@ -398,12 +415,14 @@
   sub write_pm {
       my($self, $module) = @_;
   
  +    my $isa = $self->isa_str($module);
  +
       my $fh = $self->open_class_file($module, '.pm');
       print $fh <<EOF;
   $self->{noedit_warning_hash}
   
   package $module;
  -
  +$isa
   use XSLoader ();
   XSLoader::load __PACKAGE__;
   
  
  
  
  1.32      +1 -0      modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_types.h	2001/04/04 05:12:54	1.31
  +++ modperl_types.h	2001/04/04 17:12:07	1.32
  @@ -9,6 +9,7 @@
   
   /* aliases */
   
  +typedef request_rec subrequest_rec;
   typedef apr_array_header_t MpAV;
   typedef apr_table_t        MpHV;
   
  
  
  
  1.1                  modperl-2.0/t/response/TestAPI/lookup_uri.pm
  
  Index: lookup_uri.pm
  ===================================================================
  package TestAPI::lookup_uri;
  
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::Test;
  use Apache::SubRequest ();
  
  sub handler {
      my $r = shift;
  
      my $uri = '/lookup_uri';
      my $subr = $r->lookup_uri($uri);
      die unless $subr->uri eq $uri;
      $subr->run;
  
      0;
  }
  
  1;
  __DATA__
  <Location /lookup_uri>
     SetHandler modperl
     PerlResponseHandler Apache::TestHandler::ok1
  </Location>
  
  
  
  1.9       +17 -11    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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apache_functions.map	2001/04/02 19:30:37	1.8
  +++ apache_functions.map	2001/04/04 17:12:07	1.9
  @@ -51,19 +51,25 @@
    ap_get_limit_xml_body
   >ap_core_translate
   
  -MODULE=Apache::SubRequest   PACKAGE=guess
  - ap_sub_req_lookup_file
  - ap_sub_req_lookup_uri
  - ap_sub_req_method_uri
  - ap_sub_req_output_filter
  - ap_set_sub_req_protocol
  +MODULE=Apache::SubRequest   PACKAGE=Apache::RequestRec
  +?ap_sub_req_output_filter
  +>ap_set_sub_req_protocol
   -ap_finalize_sub_req_protocol
  - ap_internal_redirect
  - ap_internal_redirect_handler
  + ap_internal_redirect         | | r, new_uri
  + ap_internal_redirect_handler | | r, new_uri
   
  -MODULE=Apache::SubRequest    PACKAGE=Apache::SubRequest
  - ap_destroy_sub_req
  - ap_run_sub_req
  +subrequest_rec *:ap_sub_req_lookup_file | | \
  + r, new_file, next_filter=NULL | lookup_file
  +
  +subrequest_rec *:ap_sub_req_lookup_uri  | | \
  + r, new_file, next_filter=NULL | lookup_uri
  +
  +subrequest_rec *:ap_sub_req_method_uri  | | \
  + r, method, new_file, next_filter=NULL | lookup_method_uri
  +
  +PACKAGE=Apache::SubRequest   ISA=Apache::RequestRec
  + ap_destroy_sub_req  | | r | DESTROY
  + ap_run_sub_req      | | r | run
   
   MODULE=Apache::RequestIO   PACKAGE=Apache::RequestRec
    ap_discard_request_body
  
  
  
  1.2       +1 -0      modperl-2.0/xs/maps/apache_types.map
  
  Index: apache_types.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_types.map,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apache_types.map	2001/03/05 03:49:12	1.1
  +++ apache_types.map	2001/04/04 17:12:08	1.2
  @@ -4,6 +4,7 @@
   struct server_addr_rec  | Apache::ServerAddr
   struct conn_rec         | Apache::Connection
   struct request_rec      | Apache::RequestRec
  +struct subrequest_rec   | Apache::SubRequest
   struct process_rec      | Apache::Process
   struct uri_components   | Apache::URI
   struct ap_method_list_t | Apache::MethodList
  
  
  

Mime
View raw message