threads::shared 1.24 (phase 2)
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / PPPort_pm.PL
index 67a80f0..5a8c227 100644 (file)
@@ -4,13 +4,13 @@
 #
 ################################################################################
 #
-#  $Revision: 50 $
+#  $Revision: 59 $
 #  $Author: mhx $
-#  $Date: 2006/12/01 13:13:28 +0100 $
+#  $Date: 2008/01/04 10:47:38 +0100 $
 #
 ################################################################################
 #
-#  Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz.
+#  Version 3.x, Copyright (C) 2004-2008, Marcus Holland-Moritz.
 #  Version 2.x, Copyright (C) 2001, Paul Marquess.
 #  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
 #
@@ -27,7 +27,7 @@ my $INCLUDE = 'parts/inc';
 my $DPPP = 'DPPP_';
 
 my %embed = map { ( $_->{name} => $_ ) }
-            parse_embed(qw(parts/embed.fnc parts/apidoc.fnc));
+            parse_embed(qw(parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc));
 
 my(%provides, %prototypes, %explicit);
 
@@ -82,6 +82,7 @@ for (@api) {
 
 my @perl_api;
 for (keys %provides) {
+  next if /^Perl_(.*)/ && exists $embed{$1};
   next if exists $embed{$_};
   push @perl_api, $_;
   check(2, "No API definition for provided element $_ found.");
@@ -125,7 +126,7 @@ $data =~ s{^__UNSUPPORTED_API__(\s*?)^}
           {join "\n", @todo}gem;
 
 $data =~ s{__MIN_PERL__}{5.003}g;
-$data =~ s{__MAX_PERL__}{5.9.4}g;
+$data =~ s{__MAX_PERL__}{5.10.0}g;
 
 open FH, ">PPPort.pm" or die "PPPort.pm: $!\n";
 print FH $data;
@@ -284,6 +285,7 @@ sub make_embed
   my $f = shift;
   my $n = $f->{name};
   my $a = do { my $x = 'a'; join ',', map { $x++ } 1 .. @{$f->{args}} };
+  my $lastarg = ${$f->{args}}[-1];
 
   if ($f->{flags}{n}) {
     if ($f->{flags}{p}) {
@@ -304,6 +306,10 @@ UNDEF
       if ($f->{flags}{f}) {
         return "#define Perl_$n $DPPP(my_$n)";
       }
+      elsif (@$lastarg && $lastarg->[0] =~ /\.\.\./) {
+        return $undef . "#define $n $DPPP(my_$n)\n" .
+                        "#define Perl_$n $DPPP(my_$n)";
+      }
       else {
         return $undef . "#define $n($a) $DPPP(my_$n)(aTHX_ $a)\n" .
                         "#define Perl_$n $DPPP(my_$n)";
@@ -339,13 +345,13 @@ __DATA__
 #
 ################################################################################
 #
-#  $Revision: 50 $
+#  $Revision: 59 $
 #  $Author: mhx $
-#  $Date: 2006/12/01 13:13:28 +0100 $
+#  $Date: 2008/01/04 10:47:38 +0100 $
 #
 ################################################################################
 #
-#  Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz.
+#  Version 3.x, Copyright (C) 2004-2008, Marcus Holland-Moritz.
 #  Version 2.x, Copyright (C) 2001, Paul Marquess.
 #  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
 #
@@ -482,7 +488,7 @@ Version 3.x was ported back to CPAN by Marcus Holland-Moritz.
 
 =head1 COPYRIGHT
 
-Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz.
+Version 3.x, Copyright (C) 2004-2008, Marcus Holland-Moritz.
 
 Version 2.x, Copyright (C) 2001, Paul Marquess.
 
@@ -502,7 +508,7 @@ package Devel::PPPort;
 use strict;
 use vars qw($VERSION $data);
 
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.10_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.14 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 sub _init_data
 {
@@ -595,12 +601,16 @@ __DATA__
 
 %include SvREFCNT
 
+%include newSVpv
+
 %include SvPV
 
 %include Sv_set
 
 %include sv_xpvf
 
+%include shared_pv
+
 %include warn
 
 %include pvs