Change 30135 by [EMAIL PROTECTED] on 2007/02/05 18:48:59
Integrate:
[ 26473]
ExtUtils::ParseXS needs to stack $filepathname to make #line directives
in #INCLUDEs work.
[ 28856]
Upgrade to ExtUtils-ParseXS-2.16. There actually are a couple of
changes in bleadperl not in the new version, so version was bumped
to 2.16_01.
[ 29269]
Subject: [PATCH] ParseXS.pm: small optimization for "Usage: ..."
constant strings
From: Alexey Tourbin <[EMAIL PROTECTED]>
Date: Tue, 14 Nov 2006 05:45:40 +0300
Message-ID: <[EMAIL PROTECTED]>
[ 29418]
Upgrade to ExtUtils-ParseXS-2.17. Actuall just caught up with
most of the patches to bleadperl. The remaining change missing
is #29252, so, the version has been bumped to 2.17_01.
[ 30134]
Upgrade to ExtUtils-ParseXS-2.18
Affected files ...
... //depot/maint-5.8/perl/lib/ExtUtils/ParseXS.pm#5 integrate
Differences ...
==== //depot/maint-5.8/perl/lib/ExtUtils/ParseXS.pm#5 (text) ====
Index: perl/lib/ExtUtils/ParseXS.pm
--- perl/lib/ExtUtils/ParseXS.pm#4~27984~ 2006-04-27 11:09:09.000000000
-0700
+++ perl/lib/ExtUtils/ParseXS.pm 2007-02-05 10:48:59.000000000 -0800
@@ -18,7 +18,7 @@
my($XSS_work_idx, $cpp_next_tmp);
use vars qw($VERSION);
-$VERSION = '2.15';
+$VERSION = '2.18';
use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re
$Overload $errors $Fallback
$cplusplus $hiertype $WantPrototypes $WantVersionChk $except
$WantLineNumbers
@@ -203,7 +203,7 @@
$size = qr[,\s* (??{ $bal }) ]x; # Third arg (to setpvn)
foreach my $key (keys %output_expr) {
- use re 'eval';
+ BEGIN { $^H |= 0x00200000 }; # Equivalent to: use re 'eval', but hardcoded
so we can compile re.xs
my ($t, $with_size, $arg, $sarg) =
($output_expr{$key} =~
@@ -456,7 +456,7 @@
\b ( \w+ | length\( \s*\w+\s* \) )
\s* $ /x);
next unless defined($pre) && length($pre);
- my $out_type;
+ my $out_type = '';
my $inout_var;
if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//) {
my $type = $1;
@@ -565,7 +565,11 @@
#XS(XS_${Full_func_name}); /* prototype to pass -Wmissing-prototypes */
#XS(XS_${Full_func_name})
#[[
+##ifdef dVAR
+# dVAR; dXSARGS;
+##else
# dXSARGS;
+##endif
EOF
print Q(<<"EOF") if $ALIAS ;
# dXSI32;
@@ -589,12 +593,12 @@
if ($ALIAS)
{ print Q(<<"EOF") if $cond }
# if ($cond)
-# Perl_croak(aTHX_ "Usage: %s($report_args)", GvNAME(CvGV(cv)));
+# Perl_croak(aTHX_ "Usage: %s(%s)", GvNAME(CvGV(cv)), "$report_args");
EOF
else
{ print Q(<<"EOF") if $cond }
# if ($cond)
-# Perl_croak(aTHX_ "Usage: $pname($report_args)");
+# Perl_croak(aTHX_ "Usage: %s(%s)", "$pname", "$report_args");
EOF
# cv doesn't seem to be used, in most cases unless we go in
@@ -919,7 +923,11 @@
print Q(<<"EOF");
#[[
+##ifdef dVAR
+# dVAR; dXSARGS;
+##else
# dXSARGS;
+##endif
EOF
#-Wall: if there is no $Full_func_name there are no xsubs in this .xs
@@ -972,6 +980,13 @@
print "\n /* End of Initialisation Section */\n\n" ;
}
+ if ($] >= 5.009) {
+ print <<'EOF';
+ if (PL_unitcheckav)
+ call_list(PL_scopestack_ix, PL_unitcheckav);
+EOF
+ }
+
print Q(<<"EOF");
# XSRETURN_YES;
#]]
@@ -1213,7 +1228,9 @@
TrimWhitespace($in);
foreach (split /[\s,]+/, $in) {
- $Interfaces{$_} = $_;
+ my $name = $_;
+ $name =~ s/^$Prefix//;
+ $Interfaces{$name} = $_;
}
print Q(<<"EOF");
# XSFUNCTION = $interface_macro($ret_type,cv,XSANY.any_dptr);
@@ -1438,6 +1455,7 @@
Line => [EMAIL PROTECTED],
LineNo => [EMAIL PROTECTED],
Filename => $filename,
+ Filepathname => $filepathname,
Handle => $FH,
}) ;
@@ -1452,7 +1470,7 @@
#
EOF
- $filename = $_ ;
+ $filepathname = $filename = $_ ;
# Prime the pump by reading the first
# non-blank line
@@ -1481,7 +1499,11 @@
close $FH ;
$FH = $data->{Handle} ;
+ # $filename is the leafname, which for some reason isused for diagnostic
+ # messages, whereas $filepathname is the full pathname, and is used for
+ # #line directives.
$filename = $data->{Filename} ;
+ $filepathname = $data->{Filepathname} ;
$lastline = $data->{LastLine} ;
$lastline_no = $data->{LastLineNo} ;
@line = @{ $data->{Line} } ;
@@ -1872,7 +1894,7 @@
}
sub UNTIE {
- # This sub does nothing, but is neccessary for references to be released.
+ # This sub does nothing, but is necessary for references to be released.
}
sub end_marker {
@@ -1941,7 +1963,7 @@
=item B<hiertype>
-Retains C<::> in type names so that C++ hierachical types can be
+Retains C<::> in type names so that C++ hierarchical types can be
mapped. Default is false.
=item B<except>
End of Patch.