httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r153903 - in httpd/apreq/branches/multi-env-unstable/glue/perl: Makefile.PL xsbuilder/APR/Request/Apache2/ xsbuilder/APR/Request/Apache2/Apache2.pm xsbuilder/APR/Request/CGI/ xsbuilder/APR/Request/CGI/CGI.pm xsbuilder/maps/apreq_functions.map
Date Tue, 15 Feb 2005 06:32:41 GMT
Author: joes
Date: Mon Feb 14 22:32:38 2005
New Revision: 153903

URL: http://svn.apache.org/viewcvs?view=rev&rev=153903
Log:

Get Apache2 and CGI constructors working.

Added:
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/Apache2.pm
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/CGI.pm
Modified:
    httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_functions.map

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL?view=diff&r1=153902&r2=153903
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL (original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/Makefile.PL Mon Feb 14 22:32:38 2005
@@ -271,6 +271,21 @@
     undef;
 }
 
+sub mod_pm {
+    my($self, $module, $complete) = @_;
+    my $dirname = $self->class_dirname($module);
+    my @parts = split '::', $module;
+    my $mod_pm = "$dirname/$parts[-1].pm";
+
+    for ($self -> xs_include_dir, @{ $self->{glue_dirs} }) {
+        my $file = "$_/$mod_pm";
+		$mod_pm = $file if $complete;
+        return $mod_pm if -e $file;
+    }
+
+    undef;
+}
+
 #inline mod_xs directly, so we can put XS directives there
 
 sub write_xs {
@@ -530,19 +545,24 @@
                             c2perl => 'apreq_xs_param2sv(ptr)',
                            },
         T_APREQ_HANDLE => {
-                            INPUT  => '$var = apreq_xs_perl2c(aTHX_ $arg, "r")',
-                            perl2c => 'apreq_xs_perl2c(aTHX_ sv, "r")',
+                            INPUT  => '$var = apreq_xs_perl2c(aTHX_ $arg, \"r\")',
+                            perl2c => 'apreq_xs_perl2c(aTHX_ sv, \"r\")',
                             c2perl => 'sv_setref_pv(newSV(0), class, ptr)',
                             OUTPUT => <<'EOT',
-    $arg = sv_setref_pv($arg, class, $var);
-    if (!sv_derived_from($arg, \"${ntype}\"))
+    $arg = sv_setref_pv(newSV(0), class, $var);
+    if (sv_derived_from($arg, \"${ntype}\")) {
+        SV *parent = ST(1);
+        SV *rv = SvRV($arg);
+        sv_magic(rv, parent, PERL_MAGIC_ext, Nullch, 0);
+    }
+    else
         Perl_croak(aTHX_ \"Usage: target class %s isn't derived from ${ntype}\", class);
 EOT
                            },
         T_APREQ_HANDLE_APACHE2 => {
-                            INPUT  => '$var = apreq_xs_perl2c(aTHX_ $arg, "r")',
+                            INPUT  => '$var = apreq_xs_perl2c(aTHX_ $arg, \"r\")',
                             OUTPUT => <<'EOT',
-    $arg = sv_setref_pv($arg, class, $var);
+    $arg = sv_setref_pv(newSV(0), class, $var);
     if (sv_derived_from($arg, \"${ntype}\")) {
         SV *parent = ST(1); /* r's SV */
         SV *rv = SvRV($arg);

Added: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/Apache2.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/Apache2.pm?view=auto&rev=153903
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/Apache2.pm
(added)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/Apache2.pm
Mon Feb 14 22:32:38 2005
@@ -0,0 +1,2 @@
+require APR::Request;
+push @ISA, "APR::Request";

Added: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/CGI.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/CGI.pm?view=auto&rev=153903
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/CGI.pm (added)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/CGI.pm Mon
Feb 14 22:32:38 2005
@@ -0,0 +1,2 @@
+require APR::Request;
+push @ISA, "APR::Request";

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_functions.map
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_functions.map?view=diff&r1=153902&r2=153903
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_functions.map (original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/maps/apreq_functions.map Mon
Feb 14 22:32:38 2005
@@ -105,7 +105,11 @@
 
 #################### APR::Request stuff ####################
 
-MODULE=APR::Request  PACKAGE=APR::Request
+MODULE=APR::Request  PACKAGE=APR::Request PREFIX=apreq_
+apreq_jar_get
+apreq_body_get
+apreq_args_get
+
 #DEFINE_jar | apreq_xs_jar |
 #DEFINE_args | apreq_xs_args |
 #DEFINE_body | apreq_xs_body |



Mime
View raw message