r51443 - in /trunk/libextutils-xspp-perl: Changes META.yml debian/changelog lib/ExtUtils/XSpp.pm lib/ExtUtils/XSpp/Node.pm lib/ExtUtils/XSpp/Typemap.pm t/075_types.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Jan 24 15:41:05 UTC 2010
Author: jawnsy-guest
Date: Sun Jan 24 15:40:49 2010
New Revision: 51443
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=51443
Log:
New upstream release
Modified:
trunk/libextutils-xspp-perl/Changes
trunk/libextutils-xspp-perl/META.yml
trunk/libextutils-xspp-perl/debian/changelog
trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp.pm
trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Node.pm
trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Typemap.pm
trunk/libextutils-xspp-perl/t/075_types.t
Modified: trunk/libextutils-xspp-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/Changes?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/Changes (original)
+++ trunk/libextutils-xspp-perl/Changes Sun Jan 24 15:40:49 2010
@@ -1,4 +1,8 @@
Revision history for Perl extension ExtUtils::XSpp.
+
+0.07 Fri Jan 22 18:07:10 CET 2010
+ - Fix issue with references as method arguments that have
+ template types. (Steffen Mueller)
0.06 Wed Jan 13 20:28:27 CET 2010
- When parsing a class declaration, automatically add a typemap
Modified: trunk/libextutils-xspp-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/META.yml?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/META.yml (original)
+++ trunk/libextutils-xspp-perl/META.yml Sun Jan 24 15:40:49 2010
@@ -1,6 +1,6 @@
---
name: ExtUtils-XSpp
-version: 0.06
+version: 0.07
author:
- 'Mattia Barbon <mbarbon at cpan.org>'
abstract: XS for C++
@@ -18,7 +18,7 @@
provides:
ExtUtils::XSpp:
file: lib/ExtUtils/XSpp.pm
- version: 0.06
+ version: 0.07
ExtUtils::XSpp::Cmd:
file: lib/ExtUtils/XSpp/Cmd.pm
ExtUtils::XSpp::Driver:
Modified: trunk/libextutils-xspp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/debian/changelog?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/debian/changelog (original)
+++ trunk/libextutils-xspp-perl/debian/changelog Sun Jan 24 15:40:49 2010
@@ -1,3 +1,9 @@
+libextutils-xspp-perl (0.07-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Jonathan Yu <jawnsy at cpan.org> Sun, 24 Jan 2010 01:34:53 -0500
+
libextutils-xspp-perl (0.06-1) unstable; urgency=low
[ Jonathan Yu ]
Modified: trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp.pm?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp.pm (original)
+++ trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp.pm Sun Jan 24 15:40:49 2010
@@ -5,6 +5,6 @@
use ExtUtils::XSpp::Driver;
-our $VERSION = '0.06';
+our $VERSION = '0.07';
1;
Modified: trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Node.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Node.pm?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Node.pm (original)
+++ trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Node.pm Sun Jan 24 15:40:49 2010
@@ -622,10 +622,9 @@
sub is_void { return $_[0]->base_type eq 'void' &&
!$_[0]->is_pointer && !$_[0]->is_reference }
-sub print {
+sub print_tmpl_args {
my $this = shift;
my $state = shift;
-
my $tmpl_args = '';
if( @{$this->template_args} ) {
$tmpl_args = '< '
@@ -633,14 +632,21 @@
map $_->print( $state ), @{$this->template_args} )
. ' >';
}
+ return $tmpl_args;
+}
+
+sub print {
+ my $this = shift;
+ my $state = shift;
return join( '',
( $this->is_const ? 'const ' : '' ),
$this->base_type,
- $tmpl_args,
+ $this->print_tmpl_args,
( $this->is_pointer ? ( '*' x $this->is_pointer ) :
$this->is_reference ? '&' : '' ) );
}
+
package ExtUtils::XSpp::Node::Module;
Modified: trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Typemap.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Typemap.pm?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Typemap.pm (original)
+++ trunk/libextutils-xspp-perl/lib/ExtUtils/XSpp/Typemap.pm Sun Jan 24 15:40:49 2010
@@ -188,11 +188,15 @@
$this->{TYPE} = $args{type};
}
-sub cpp_type { $_[0]->{TYPE}->base_type . '*' }
+sub cpp_type {
+ my $type = $_[0]->type;
+ $type->base_type . $type->print_tmpl_args . ('*' x ($type->is_pointer+1))
+}
sub output_code { undef }
sub call_parameter_code { "*( $_[1] )" }
sub call_function_code {
- $_[2] . ' = new ' . $_[0]->type->base_type . '( ' . $_[1] . " )";
+ my $type = $_[0]->type;
+ $_[2] . ' = new ' . $type->base_type . $type->print_tmpl_args . '( ' . $_[1] . " )";
}
1;
Modified: trunk/libextutils-xspp-perl/t/075_types.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-xspp-perl/t/075_types.t?rev=51443&op=diff
==============================================================================
--- trunk/libextutils-xspp-perl/t/075_types.t (original)
+++ trunk/libextutils-xspp-perl/t/075_types.t Sun Jan 24 15:40:49 2010
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use t::lib::XSP::Test tests => 3;
+use t::lib::XSP::Test tests => 4;
run_diff xsp_stdout => 'expected';
@@ -79,3 +79,22 @@
void
boo( a )
const std::map< int, std::string > a
+=== Template argument transformed to pointer
+--- xsp_stdout
+%module{Foo};
+%package{Foo};
+
+%typemap{const std::vector<double>&}{reference}; // check type equality
+
+void foo(const std::vector<double>& a);
+--- expected
+MODULE=Foo
+
+MODULE=Foo PACKAGE=Foo
+
+
+void
+foo( a )
+ std::vector< double >* a
+ CODE:
+ foo( *( a ) );
More information about the Pkg-perl-cvs-commits
mailing list