This is an automated email from the git hooks/post-receive script.

dom pushed a commit to branch master
in repository libextutils-parsexs-perl.

commit f80e5d00d2cd82f2ab81c9739e6c724ea4ce74df
Author: Dominic Hargreaves <d...@earth.li>
Date:   Mon Aug 31 17:38:35 2015 +0100

    Imported Upstream version 3.300000
---
 Changes                            |  11 +++
 MANIFEST                           |   3 +-
 META.json                          |  58 ++++++++++++++
 META.yml                           |  60 +++++++-------
 README                             |   3 +-
 lib/ExtUtils/ParseXS.pm            | 160 ++++++++++++++++++++++++++++---------
 lib/ExtUtils/ParseXS/Constants.pm  |   2 +-
 lib/ExtUtils/ParseXS/CountLines.pm |   2 +-
 lib/ExtUtils/ParseXS/Eval.pm       |   2 +-
 lib/ExtUtils/ParseXS/Utilities.pm  |  23 +++---
 lib/ExtUtils/Typemaps.pm           |   3 +-
 lib/ExtUtils/Typemaps/Cmd.pm       |   2 +-
 lib/ExtUtils/Typemaps/InputMap.pm  |   2 +-
 lib/ExtUtils/Typemaps/OutputMap.pm |   4 +-
 lib/ExtUtils/Typemaps/Type.pm      |   2 +-
 t/109-standard_XS_defs.t           |   3 +-
 16 files changed, 246 insertions(+), 94 deletions(-)

diff --git a/Changes b/Changes
index 41966fd..108b6fa 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,16 @@
 Revision history for Perl extension ExtUtils::ParseXS.
 
+3.30 - Mon Aug 31 10:35:00 CET 2015
+  - Promote to stable CPAN release.
+
+3.29_01 - Mon Aug 10 10:45:00 CET 2015
+  - Support added for XS handshake API introduced in 5.21.6.
+  - Backported S_croak_xs_usage optimized on threaded builds
+  - Fix INCLUDE_COMMAND $^X for Perl In Space
+  - Remove 'use lib' left over from refactoring
+  - Document + improve ancient optimization in ParseXS
+  - Improve RETVAL code gen
+
 3.24 - Wed Mar  5 18:20:00 CET 2014
   - Native Android build fixes
   - More lenient syntax for embedded TYPEMAP blocks in XS:
diff --git a/MANIFEST b/MANIFEST
index 72560dd..2b49185 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -63,4 +63,5 @@ t/XSTest.xs
 t/XSUsage.pm
 t/XSUsage.xs
 t/XSWarn.xs
-META.yml                                 Module meta-data (added by MakeMaker)
+META.yml                                 Module YAML meta-data (added by 
MakeMaker)
+META.json                                Module JSON meta-data (added by 
MakeMaker)
diff --git a/META.json b/META.json
new file mode 100644
index 0000000..b189468
--- /dev/null
+++ b/META.json
@@ -0,0 +1,58 @@
+{
+   "abstract" : "converts Perl XS code into C code",
+   "author" : [
+      "Ken Williams <k...@mathforum.org>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter 
version 2.150001",
+   "license" : [
+      "unknown"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
+      "version" : "2"
+   },
+   "name" : "ExtUtils-ParseXS",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "6.46"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Carp" : "0",
+            "Cwd" : "0",
+            "DynaLoader" : "0",
+            "Exporter" : "5.57",
+            "ExtUtils::CBuilder" : "0",
+            "ExtUtils::MakeMaker" : "6.46",
+            "File::Basename" : "0",
+            "File::Spec" : "0",
+            "Symbol" : "0",
+            "Test::More" : "0.47"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "bugtracker" : {
+         "web" : "http://rt.perl.org/rt3/";
+      },
+      "repository" : {
+         "url" : "git://perl5.git.perl.org/gitroot/perl.git"
+      }
+   },
+   "version" : "3.30"
+}
diff --git a/META.yml b/META.yml
index 225f4aa..2035967 100644
--- a/META.yml
+++ b/META.yml
@@ -1,34 +1,34 @@
---- #YAML:1.0
-name:               ExtUtils-ParseXS
-version:            3.24
-abstract:           converts Perl XS code into C code
+---
+abstract: 'converts Perl XS code into C code'
 author:
-    - Ken Williams <k...@mathforum.org>
-license:            unknown
-distribution_type:  module
-configure_requires:
-    ExtUtils::MakeMaker:  6.46
+  - 'Ken Williams <k...@mathforum.org>'
 build_requires:
-    ExtUtils::MakeMaker:  0
+  ExtUtils::MakeMaker: '0'
+configure_requires:
+  ExtUtils::MakeMaker: '6.46'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 
2.150001'
+license: unknown
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: '1.4'
+name: ExtUtils-ParseXS
+no_index:
+  directory:
+    - t
+    - inc
 requires:
-    Carp:                 0
-    Cwd:                  0
-    DynaLoader:           0
-    Exporter:             5.57
-    ExtUtils::CBuilder:   0
-    ExtUtils::MakeMaker:  6.46
-    File::Basename:       0
-    File::Spec:           0
-    Symbol:               0
-    Test::More:           0.47
+  Carp: '0'
+  Cwd: '0'
+  DynaLoader: '0'
+  Exporter: '5.57'
+  ExtUtils::CBuilder: '0'
+  ExtUtils::MakeMaker: '6.46'
+  File::Basename: '0'
+  File::Spec: '0'
+  Symbol: '0'
+  Test::More: '0.47'
 resources:
-    bugtracker:  http://rt.perl.org/rt3/
-    repository:  git://perl5.git.perl.org/gitroot/perl.git
-no_index:
-    directory:
-        - t
-        - inc
-generated_by:       ExtUtils::MakeMaker version 6.57_05
-meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+  bugtracker: http://rt.perl.org/rt3/
+  repository: git://perl5.git.perl.org/gitroot/perl.git
+version: '3.30'
diff --git a/README b/README
index 5a2cbc6..999ab73 100644
--- a/README
+++ b/README
@@ -13,7 +13,6 @@ SYNOPSIS
                           typemap => 'path/to/typemap',
                           hiertype => 1,
                           except => 1,
-                          prototypes => 1,
                           versioncheck => 1,
                           linenumbers => 1,
                           optimize => 1,
@@ -119,7 +118,7 @@ AUTHOR
     *   Steffen Mueller, <smuel...@cpan.org>
 
 COPYRIGHT
-    Copyright 2002-2013 by Ken Williams, David Golden and other
+    Copyright 2002-2014 by Ken Williams, David Golden and other
     contributors. All rights reserved.
 
     This library is free software; you can redistribute it and/or modify it
diff --git a/lib/ExtUtils/ParseXS.pm b/lib/ExtUtils/ParseXS.pm
index 25d3175..f67a82d 100644
--- a/lib/ExtUtils/ParseXS.pm
+++ b/lib/ExtUtils/ParseXS.pm
@@ -11,7 +11,7 @@ use Symbol;
 
 our $VERSION;
 BEGIN {
-  $VERSION = '3.24';
+  $VERSION = '3.30';
 }
 use ExtUtils::ParseXS::Constants $VERSION;
 use ExtUtils::ParseXS::CountLines $VERSION;
@@ -797,12 +797,15 @@ EOF
 #
 EOF
 
-    $self->{newXS} = "newXS";
     $self->{proto} = "";
-
+    unless($self->{ProtoThisXSUB}) {
+      $self->{newXS} = "newXS_deffile";
+      $self->{file} = "";
+    }
+    else {
     # Build the prototype string for the xsub
-    if ($self->{ProtoThisXSUB}) {
       $self->{newXS} = "newXSproto_portable";
+      $self->{file} = ", file";
 
       if ($self->{ProtoThisXSUB} eq 2) {
         # User has specified empty prototype
@@ -831,14 +834,14 @@ EOF
       foreach my $xname (sort keys %{ $self->{XsubAliases} }) {
         my $value = $self->{XsubAliases}{$xname};
         push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-#        cv = $self->{newXS}(\"$xname\", XS_$self->{Full_func_name}, 
file$self->{proto});
+#        cv = $self->{newXS}(\"$xname\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});
 #        XSANY.any_i32 = $value;
 EOF
       }
     }
     elsif (@{ $self->{Attributes} }) {
       push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-#        cv = $self->{newXS}(\"$self->{pname}\", XS_$self->{Full_func_name}, 
file$self->{proto});
+#        cv = $self->{newXS}(\"$self->{pname}\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});
 #        apply_attrs_string("$self->{Package}", cv, "@{ $self->{Attributes} 
}", 0);
 EOF
     }
@@ -847,18 +850,18 @@ EOF
         my $value = $self->{Interfaces}{$yname};
         $yname = "$self->{Package}\::$yname" unless $yname =~ /::/;
         push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-#        cv = $self->{newXS}(\"$yname\", XS_$self->{Full_func_name}, 
file$self->{proto});
+#        cv = $self->{newXS}(\"$yname\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});
 #        $self->{interface_macro_set}(cv,$value);
 EOF
       }
     }
-    elsif($self->{newXS} eq 'newXS'){ # work around P5NCI's empty newXS macro
+    elsif($self->{newXS} eq 'newXS_deffile'){ # work around P5NCI's empty 
newXS macro
       push(@{ $self->{InitFileCode} },
-       "        $self->{newXS}(\"$self->{pname}\", XS_$self->{Full_func_name}, 
file$self->{proto});\n");
+       "        $self->{newXS}(\"$self->{pname}\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});\n");
     }
     else {
       push(@{ $self->{InitFileCode} },
-       "        (void)$self->{newXS}(\"$self->{pname}\", 
XS_$self->{Full_func_name}, file$self->{proto});\n");
+       "        (void)$self->{newXS}(\"$self->{pname}\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});\n");
     }
   } # END 'PARAGRAPH' 'while' loop
 
@@ -876,7 +879,7 @@ EOF
     /* Making a sub named "$self->{Package}::()" allows the package */
     /* to be findable via fetchmethod(), and causes */
     /* overload::Overloaded("$self->{Package}") to return true. */
-    (void)$self->{newXS}("$self->{Package}::()", XS_$self->{Packid}_nil, 
file$self->{proto});
+    (void)$self->{newXS}("$self->{Package}::()", 
XS_$self->{Packid}_nil$self->{file}$self->{proto});
 MAKE_FETCHMETHOD_WORK
   }
 
@@ -891,11 +894,13 @@ EOF
   print Q(<<"EOF");
 #XS_EXTERNAL(boot_$self->{Module_cname}); /* prototype to pass 
-Wmissing-prototypes */
 #XS_EXTERNAL(boot_$self->{Module_cname})
-EOF
-
-  print Q(<<"EOF");
 #[[
+##if PERL_VERSION_LE(5, 21, 5)
 #    dVAR; dXSARGS;
+##else
+#    dVAR; ${\($self->{WantVersionChk} ?
+     'dXSBOOTARGSXSAPIVERCHK;' : 'dXSBOOTARGSAPIVERCHK;')}
+##endif
 EOF
 
   #Under 5.8.x and lower, newXS is declared in proto.h as expecting a non-const
@@ -909,6 +914,8 @@ EOF
 ##else
 #    const char* file = __FILE__;
 ##endif
+#
+#    PERL_UNUSED_VAR(file);
 EOF
 
   print Q("#\n");
@@ -916,15 +923,26 @@ EOF
   print Q(<<"EOF");
 #    PERL_UNUSED_VAR(cv); /* -W */
 #    PERL_UNUSED_VAR(items); /* -W */
-##ifdef XS_APIVERSION_BOOTCHECK
+EOF
+
+  if( $self->{WantVersionChk}){
+    print Q(<<"EOF") ;
+##if PERL_VERSION_LE(5, 21, 5)
+#    XS_VERSION_BOOTCHECK;
+##  ifdef XS_APIVERSION_BOOTCHECK
 #    XS_APIVERSION_BOOTCHECK;
+##  endif
 ##endif
+
 EOF
+  } else {
+    print Q(<<"EOF") ;
+##if PERL_VERSION_LE(5, 21, 5) && defined(XS_APIVERSION_BOOTCHECK)
+#  XS_APIVERSION_BOOTCHECK;
+##endif
 
-  print Q(<<"EOF") if $self->{WantVersionChk};
-#    XS_VERSION_BOOTCHECK;
-#
 EOF
+  }
 
   print Q(<<"EOF") if defined $self->{XsubAliases} or defined 
$self->{interfaces};
 #    {
@@ -960,14 +978,15 @@ EOF
   }
 
   print Q(<<'EOF');
-##if (PERL_REVISION == 5 && PERL_VERSION >= 9)
-#  if (PL_unitcheckav)
-#       call_list(PL_scopestack_ix, PL_unitcheckav);
-##endif
-EOF
-
-  print Q(<<"EOF");
+##if PERL_VERSION_LE(5, 21, 5)
+##  if PERL_VERSION_GE(5, 9, 0)
+#    if (PL_unitcheckav)
+#        call_list(PL_scopestack_ix, PL_unitcheckav);
+##  endif
 #    XSRETURN_YES;
+##else
+#    Perl_xs_boot_epilog(aTHX_ ax);
+##endif
 #]]
 #
 EOF
@@ -1322,7 +1341,7 @@ sub OVERLOAD_handler {
       $self->{Overload} = 1 unless $self->{Overload};
       my $overload = "$self->{Package}\::(".$1;
       push(@{ $self->{InitFileCode} },
-       "        (void)$self->{newXS}(\"$overload\", 
XS_$self->{Full_func_name}, file$self->{proto});\n");
+       "        (void)$self->{newXS}(\"$overload\", 
XS_$self->{Full_func_name}$self->{file}$self->{proto});\n");
     }
   }
 }
@@ -1558,6 +1577,25 @@ sub QuoteArgs {
   return join (' ', ($cmd, @args));
 }
 
+# code copied from CPAN::HandleConfig::safe_quote
+#  - that has doc saying leave if start/finish with same quote, but no code
+# given text, will conditionally quote it to protect from shell
+{
+  my ($quote, $use_quote) = $^O eq 'MSWin32'
+      ? (q{"}, q{"})
+      : (q{"'}, q{'});
+  sub _safe_quote {
+      my ($self, $command) = @_;
+      # Set up quote/default quote
+      if (defined($command)
+          and $command =~ /\s/
+          and $command !~ /[$quote]/) {
+          return qq{$use_quote$command$use_quote}
+      }
+      return $command;
+  }
+}
+
 sub INCLUDE_COMMAND_handler {
   my $self = shift;
   $_ = shift;
@@ -1579,7 +1617,8 @@ sub INCLUDE_COMMAND_handler {
 
   # If $^X is used in INCLUDE_COMMAND, we know it's supposed to be
   # the same perl interpreter as we're currently running
-  s/^\s*\$\^X/$^X/;
+  my $X = $self->_safe_quote($^X); # quotes if has spaces
+  s/^\s*\$\^X/$X/;
 
   # open the new file
   open ($self->{FH}, "-|", $_)
@@ -1848,7 +1887,10 @@ sub generate_init {
 
   my $typem = $typemaps->get_typemap(ctype => $type);
   my $xstype = $typem->xstype;
-  $xstype =~ s/OBJ$/REF/ if $self->{func_name} =~ /DESTROY$/;
+  #this is an optimization from perl 5.0 alpha 6, class check is skipped
+  #T_REF_IV_REF is missing since it has no untyped analog at the moment
+  $xstype =~ s/OBJ$/REF/ || $xstype =~ s/^T_REF_IV_PTR$/T_PTRREF/
+    if $self->{func_name} =~ /DESTROY$/;
   if ($xstype eq 'T_PV' and exists $self->{lengthof}->{$var}) {
     print "\t$var" unless $printed_name;
     print " = ($type)SvPV($arg, STRLEN_length_of_$var);\n";
@@ -2002,36 +2044,78 @@ sub generate_output {
       print "\t\tSvSETMAGIC(ST(ix_$var));\n" if $do_setmagic;
     }
     elsif ($var eq 'RETVAL') {
+      my $orig_arg = $arg;
+      my $indent;
+      my $use_RETVALSV = 1;
+      my $do_mortal = 0;
+      my $do_copy_tmp = 1;
+      my $pre_expr;
+      local $eval_vars->{arg} = $arg = 'RETVALSV';
       my $evalexpr = $self->eval_output_typemap_code("qq\a$expr\a", 
$eval_vars);
+
       if ($expr =~ /^\t\Q$arg\E = new/) {
         # We expect that $arg has refcnt 1, so we need to
         # mortalize it.
-        print $evalexpr;
-        print "\tsv_2mortal(ST($num));\n";
-        print "\tSvSETMAGIC(ST($num));\n" if $do_setmagic;
+        $do_mortal = 1;
       }
       # If RETVAL is immortal, don't mortalize it. This code is not perfect:
       # It won't detect a func or expression that only returns immortals, for
       # example, this RE must be tried before next elsif.
       elsif ($evalexpr =~ 
/^\t\Q$arg\E\s*=\s*(boolSV\(|(&PL_sv_yes|&PL_sv_no|&PL_sv_undef)\s*;)/) {
-        print $evalexpr;
+        $do_copy_tmp = 0; #$arg will be a ST(X), no SV* RETVAL, no RETVALSV
+        $use_RETVALSV = 0;
       }
       elsif ($evalexpr =~ /^\s*\Q$arg\E\s*=/) {
         # We expect that $arg has refcnt >=1, so we need
         # to mortalize it!
-        print $evalexpr;
-        print "\tsv_2mortal(ST(0));\n";
-        print "\tSvSETMAGIC(ST(0));\n" if $do_setmagic;
+        $use_RETVALSV = 0 if $ntype eq "SVPtr";#reuse SV* RETVAL vs open new 
block
+        $do_mortal = 1;
       }
       else {
         # Just hope that the entry would safely write it
         # over an already mortalized value. By
-        # coincidence, something like $arg = &sv_undef
+        # coincidence, something like $arg = &PL_sv_undef
         # works too, but should be caught above.
-        print "\tST(0) = sv_newmortal();\n";
-        print $evalexpr;
+        $pre_expr = "RETVALSV = sv_newmortal();\n";
         # new mortals don't have set magic
+        $do_setmagic = 0;
+      }
+      if($use_RETVALSV) {
+        print "\t{\n\t    SV * RETVALSV;\n";
+        $indent = "\t    ";
+      } else {
+        $indent = "\t";
+      }
+      print $indent.$pre_expr if $pre_expr;
+
+      if($use_RETVALSV) {
+        #take control of 1 layer of indent, may or may not indent more
+        $evalexpr =~ s/^(\t|        )/$indent/gm;
+        #"\t    \t" doesn't draw right in some IDEs
+        #break down all \t into spaces
+        $evalexpr =~ s/\t/        /g;
+        #rebuild back into \t'es, \t==8 spaces, indent==4 spaces
+        $evalexpr =~ s/        /\t/g;
+      }
+      else {
+        if($do_mortal || $do_setmagic) {
+        #typemap entry evaled with RETVALSV, if we aren't using RETVALSV 
replace
+          $evalexpr =~ s/RETVALSV/RETVAL/g; #all uses with RETVAL for prettier 
code
+        }
+        else { #if no extra boilerplate (no mortal, no set magic) is needed
+            #after $evalexport, get rid of RETVALSV's visual cluter and change
+          $evalexpr =~ s/RETVALSV/$orig_arg/g;#the lvalue to ST(X)
+        }
       }
+      #stop "  RETVAL = RETVAL;" for SVPtr type
+      print $evalexpr if $evalexpr !~ /^\s*RETVAL = RETVAL;$/;
+      print $indent.'RETVAL'.($use_RETVALSV ? 'SV':'')
+            .' = sv_2mortal(RETVAL'.($use_RETVALSV ? 'SV':'').");\n" if 
$do_mortal;
+      print $indent.'SvSETMAGIC(RETVAL'.($use_RETVALSV ? 'SV':'').");\n" if 
$do_setmagic;
+      #dont do "RETVALSV = boolSV(RETVAL); ST(0) = RETVALSV;", it is visual 
clutter
+      print $indent."$orig_arg = RETVAL".($use_RETVALSV ? 'SV':'').";\n"
+        if $do_mortal || $do_setmagic || $do_copy_tmp;
+      print "\t}\n" if $use_RETVALSV;
     }
     elsif ($do_push) {
       print "\tPUSHs(sv_newmortal());\n";
diff --git a/lib/ExtUtils/ParseXS/Constants.pm 
b/lib/ExtUtils/ParseXS/Constants.pm
index 34fbc21..8856551 100644
--- a/lib/ExtUtils/ParseXS/Constants.pm
+++ b/lib/ExtUtils/ParseXS/Constants.pm
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use Symbol;
 
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 =head1 NAME
 
diff --git a/lib/ExtUtils/ParseXS/CountLines.pm 
b/lib/ExtUtils/ParseXS/CountLines.pm
index 473f531..2f45292 100644
--- a/lib/ExtUtils/ParseXS/CountLines.pm
+++ b/lib/ExtUtils/ParseXS/CountLines.pm
@@ -1,7 +1,7 @@
 package ExtUtils::ParseXS::CountLines;
 use strict;
 
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 our $SECTION_END_MARKER;
 
diff --git a/lib/ExtUtils/ParseXS/Eval.pm b/lib/ExtUtils/ParseXS/Eval.pm
index 4b8cbd6..8c075a3 100644
--- a/lib/ExtUtils/ParseXS/Eval.pm
+++ b/lib/ExtUtils/ParseXS/Eval.pm
@@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval;
 use strict;
 use warnings;
 
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 =head1 NAME
 
diff --git a/lib/ExtUtils/ParseXS/Utilities.pm 
b/lib/ExtUtils/ParseXS/Utilities.pm
index ae384fd..4de9f4e 100644
--- a/lib/ExtUtils/ParseXS/Utilities.pm
+++ b/lib/ExtUtils/ParseXS/Utilities.pm
@@ -3,10 +3,9 @@ use strict;
 use warnings;
 use Exporter;
 use File::Spec;
-use lib qw( lib );
 use ExtUtils::ParseXS::Constants ();
 
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 our (@ISA, @EXPORT_OK);
 @ISA = qw(Exporter);
@@ -453,10 +452,10 @@ EOF
 
 /* prototype to pass -Wmissing-prototypes */
 STATIC void
-S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
+S_croak_xs_usage(const CV *const cv, const char *const params);
 
 STATIC void
-S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
+S_croak_xs_usage(const CV *const cv, const char *const params)
 {
     const GV *const gv = CvGV(cv);
 
@@ -468,21 +467,17 @@ S_croak_xs_usage(pTHX_ const CV *const cv, const char 
*const params)
         const char *const hvname = stash ? HvNAME(stash) : NULL;
 
         if (hvname)
-            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
+           Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
         else
-            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
+           Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
     } else {
         /* Pants. I don't think that it should be possible to get here. */
-        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
+       Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
     }
 }
 #undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE
 
-#ifdef PERL_IMPLICIT_CONTEXT
-#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
-#else
 #define croak_xs_usage        S_croak_xs_usage
-#endif
 
 #endif
 
@@ -495,6 +490,12 @@ S_croak_xs_usage(pTHX_ const CV *const cv, const char 
*const params)
 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, 
c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
 #endif /* !defined(newXS_flags) */
 
+#if PERL_VERSION_LE(5, 21, 5)
+#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
+#else
+#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
+#endif
+
 EOF
   return 1;
 }
diff --git a/lib/ExtUtils/Typemaps.pm b/lib/ExtUtils/Typemaps.pm
index 8bc04af..a16ae06 100644
--- a/lib/ExtUtils/Typemaps.pm
+++ b/lib/ExtUtils/Typemaps.pm
@@ -2,8 +2,7 @@ package ExtUtils::Typemaps;
 use 5.006001;
 use strict;
 use warnings;
-our $VERSION = '3.24';
-#use Carp qw(croak);
+our $VERSION = '3.30';
 
 require ExtUtils::ParseXS;
 require ExtUtils::ParseXS::Constants;
diff --git a/lib/ExtUtils/Typemaps/Cmd.pm b/lib/ExtUtils/Typemaps/Cmd.pm
index a0be008..ccd5efe 100644
--- a/lib/ExtUtils/Typemaps/Cmd.pm
+++ b/lib/ExtUtils/Typemaps/Cmd.pm
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::Cmd;
 use 5.006001;
 use strict;
 use warnings;
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 use ExtUtils::Typemaps;
 
diff --git a/lib/ExtUtils/Typemaps/InputMap.pm 
b/lib/ExtUtils/Typemaps/InputMap.pm
index 3a60035..67ea1c2 100644
--- a/lib/ExtUtils/Typemaps/InputMap.pm
+++ b/lib/ExtUtils/Typemaps/InputMap.pm
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::InputMap;
 use 5.006001;
 use strict;
 use warnings;
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 =head1 NAME
 
diff --git a/lib/ExtUtils/Typemaps/OutputMap.pm 
b/lib/ExtUtils/Typemaps/OutputMap.pm
index 8a01969..42cbe5c 100644
--- a/lib/ExtUtils/Typemaps/OutputMap.pm
+++ b/lib/ExtUtils/Typemaps/OutputMap.pm
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::OutputMap;
 use 5.006001;
 use strict;
 use warnings;
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 =head1 NAME
 
@@ -108,7 +108,7 @@ eligible for using the C<TARG>-related macros to optimize 
this.
 Thus the name of the method: C<targetable>.
 
 If this optimization is applicable, C<ExtUtils::ParseXS> will
-emit a C<dXSTARG;> definition at the start of the generate XSUB code,
+emit a C<dXSTARG;> definition at the start of the generated XSUB code,
 and type (see below) dependent code to set C<TARG> and push it on
 the stack at the end of the generated XSUB code.
 
diff --git a/lib/ExtUtils/Typemaps/Type.pm b/lib/ExtUtils/Typemaps/Type.pm
index fa0ca69..7e0f4ba 100644
--- a/lib/ExtUtils/Typemaps/Type.pm
+++ b/lib/ExtUtils/Typemaps/Type.pm
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 require ExtUtils::Typemaps;
 
-our $VERSION = '3.24';
+our $VERSION = '3.30';
 
 =head1 NAME
 
diff --git a/t/109-standard_XS_defs.t b/t/109-standard_XS_defs.t
index 0d11c47..da03920 100644
--- a/t/109-standard_XS_defs.t
+++ b/t/109-standard_XS_defs.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 $| = 1;
-use Test::More tests => 5;
+use Test::More tests => 4;
 use File::Spec;
 use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib');
 use ExtUtils::ParseXS::Utilities qw(
@@ -13,7 +13,6 @@ use PrimitiveCapture;
 my @statements = (
     '#ifndef PERL_UNUSED_VAR',
     '#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE',
-    '#ifdef PERL_IMPLICIT_CONTEXT',
     '#ifdef newXS_flags',
 );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libextutils-parsexs-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to