joes 2003/06/10 07:43:10
Modified: . Makefile.am
build xsbuilder.pl
glue/perl/t/response/TestApReq cookie.pm
glue/perl/xsbuilder apreq_xs_postperl.h
glue/perl/xsbuilder/Apache/Cookie Cookie_pm
Log:
Update xsbuilder typemaps, add missing newline to Makefile.am, and fix
refcount problem with tiehash magic.
Revision Changes Path
1.8 +1 -1 httpd-apreq-2/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/httpd-apreq-2/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.am 9 Jun 2003 04:00:44 -0000 1.7
+++ Makefile.am 10 Jun 2003 14:43:10 -0000 1.8
@@ -14,4 +14,4 @@
cd glue/perl; make test
perl_glue:
- cd glue/perl; @PERL@ ../../build/xsbuilder.pl run && @PERL@ Makefile.PL
&& make
\ No newline at end of file
+ cd glue/perl; @PERL@ ../../build/xsbuilder.pl run && @PERL@ Makefile.PL
&& make
1.5 +15 -15 httpd-apreq-2/build/xsbuilder.pl
Index: xsbuilder.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/build/xsbuilder.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xsbuilder.pl 7 Jun 2003 20:16:23 -0000 1.4
+++ xsbuilder.pl 10 Jun 2003 14:43:10 -0000 1.5
@@ -137,8 +137,8 @@
}
-
package My::WrapXS;
+
use base qw/ExtUtils::XSBuilder::WrapXS/;
our $VERSION = '0.1';
__PACKAGE__ -> $_ for @ARGV;
@@ -238,28 +238,28 @@
{
{
T_APREQ_COOKIE => {
- INPUT => '$var = apreq_xs_sv2cookie($arg)',
- perl2c => 'apreq_xs_sv2cookie(sv)',
- OUTPUT => '$arg =
apreq_xs_cookie2sv($var,apreq_xs_class);',
- c2perl =>
'apreq_xs_cookie2sv(ptr,apreq_xs_class);',
+ INPUT => '$var = apreq_xs_sv2(cookie,$arg)',
+ perl2c => 'apreq_xs_sv2(cookie,sv)',
+ OUTPUT => '$arg =
apreq_xs_2sv($var,"\${ntype}\");',
+ c2perl => 'apreq_xs_2sv(ptr,\"$class\")',
},
T_APREQ_PARAM => {
INPUT => '$var = apreq_xs_sv2param($arg)',
perl2c => 'apreq_xs_sv2param(sv)',
- OUTPUT => '$arg =
apreq_xs_param2sv($var,apreq_xs_class);',
- c2perl =>
'apreq_xs_param2sv(ptr,apreq_xs_class)',
+ OUTPUT => '$arg = apreq_xs_param2sv($var);',
+ c2perl => 'apreq_xs_param2sv(ptr)',
},
T_APREQ_REQUEST => {
- INPUT => '$var = apreq_xs_sv2request($arg)',
- perl2c => 'apreq_xs_sv2request(sv)',
- OUTPUT => '$arg =
apreq_xs_request2sv($var,apreq_xs_class);',
- c2perl =>
'apreq_xs_request2sv(ptr,apreq_xs_class)',
+ INPUT => '$var = apreq_xs_sv2(request,$arg)',
+ perl2c => 'apreq_xs_sv2(request,sv)',
+ OUTPUT => '$arg =
apreq_xs_2sv($var,\"${ntype}\");',
+ c2perl => 'apreq_xs_2sv(ptr,\"$class\")',
},
T_APREQ_JAR => {
- INPUT => '$var = apreq_xs_sv2jar($arg)',
- perl2c => 'apreq_xs_sv2jar(sv)',
- OUTPUT => '$arg =
apreq_xs_jar2sv($var,apreq_xs_class);',
- c2perl => 'apreq_xs_jar2sv(ptr,apreq_xs_class)',
+ INPUT => '$var = apreq_xs_sv2(jar,$arg)',
+ perl2c => 'apreq_xs_sv2(jar,sv)',
+ OUTPUT => '$arg =
apreq_xs_2sv($var,\"${ntype}\");',
+ c2perl => 'apreq_xs_2sv(ptr,\"$class\")',
},
}
}
1.3 +1 -2 httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm
Index: cookie.pm
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cookie.pm 10 Jun 2003 10:50:31 -0000 1.2
+++ cookie.pm 10 Jun 2003 14:43:10 -0000 1.3
@@ -1,7 +1,7 @@
package TestApReq::cookie;
use strict;
-use warnings;# FATAL => 'all';
+use warnings FATAL => 'all';
use Apache::Request ();
use Apache::RequestIO;
@@ -18,7 +18,6 @@
my %cookies = Apache::Cookie->fetch($r);
$r->content_type('text/plain');
- warn "apache => $cookies{apache}";
my $test = $apr->param('test');
my $key = $apr->param('key');
1.8 +2 -0 httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h
Index: apreq_xs_postperl.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- apreq_xs_postperl.h 10 Jun 2003 10:50:31 -0000 1.7
+++ apreq_xs_postperl.h 10 Jun 2003 14:43:10 -0000 1.8
@@ -75,6 +75,8 @@
sv_magic(SvRV(rv), Nullsv, PERL_MAGIC_ext, env, 0);
sv_magic(sv, rv, PERL_MAGIC_tied, Nullch, 0);
+ SvREFCNT_dec(rv); /* corrects SvREFCNT_inc(rv) implicit in sv_magic */
+
return sv_bless(newRV_noinc(sv), SvSTASH(SvRV(rv)));
}
1.5 +2 -2 httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm
Index: Cookie_pm
===================================================================
RCS file:
/home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Cookie_pm 10 Jun 2003 10:50:31 -0000 1.4
+++ Cookie_pm 10 Jun 2003 14:43:10 -0000 1.5
@@ -1,5 +1,5 @@
use strict;
-#use warnings FATAL => 'all';
+use warnings;# FATAL => 'all';
use Apache2;
use APR;
use APR::Table;
@@ -14,7 +14,6 @@
package Apache::Cookie;
push our(@ISA), __PACKAGE__ -> env;
use Devel::Peek;
-#use overload '"' => sub {${$_[0]}};
sub status { ${$_[0]} + 0 }
@@ -33,6 +32,7 @@
my $self = shift;
my $jar = $self->jar(@_);
Dump($jar->cookies);
+ Dump($jar->get("apache"));
return wantarray ? %{$jar->cookies} : $jar->cookies;
}