diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2007-08-12 23:17:42 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2007-08-12 23:17:42 +0000 |
commit | 679ad62ddea1877bd96eafca271767acf6241fd7 (patch) | |
tree | 51d45d5029b9d9161a7fa8040b50a1c14920baa2 /ext | |
parent | e9515b0f73bee32254d01f1895ff1206459e6758 (diff) | |
download | perl-679ad62ddea1877bd96eafca271767acf6241fd7.tar.gz |
Upgrade to Devel::PPPort 3.11_02
p4raw-id: //depot/perl@31705
Diffstat (limited to 'ext')
51 files changed, 1279 insertions, 301 deletions
diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index 0a7b8babb3..222774c7b5 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,49 @@ +3.11_02 - 2007-08-13 + + * fix cpan #25372: special case sv_magic(sv, obj, how, name, 0) + * fix cpan #27906: [PATCH] add UTF8_MAXBYTES + (thanks to Steve Peters for providing a patch) + * added support for the following API + sv_2pv_flags + sv_2pvbyte_nolen + SV_CONST_RETURN + SV_COW_DROP_PV + SV_COW_SHARED_HASH_KEYS + SV_GMAGIC + SV_HAS_TRAILING_NUL + SV_IMMEDIATE_UNREF + sv_magic_portable + SV_MUTABLE_RETURN + SV_NOSTEAL + sv_pvn_force_flags + SV_SMAGIC + SV_UTF8_NO_ENCODING + SvPV_const + SvPV_flags + SvPV_flags_const + SvPV_flags_const_nolen + SvPV_flags_mutable + SvPV_force + SvPV_force_flags + SvPV_force_flags_mutable + SvPV_force_flags_nolen + SvPV_force_mutable + SvPV_force_nolen + SvPV_force_nomg_nolen + SvPV_mutable + SvPV_nolen_const + SvPV_nomg_const + SvPV_nomg_const_nolen + SvUOK + UTF8_MAXBYTES + * provide compatibility macros for vanished variables + PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters + * add warnings support to ppport.h + * update ppport.h file searching logic + * add -c.inc and -xs.inc to the list of supported extensions + * document that --copy doesn't include the dot + * improve soak script and devel/buildperl.pl + 3.11_01 - 2007-03-23 * added support for the following API diff --git a/ext/Devel/PPPort/HACKERS b/ext/Devel/PPPort/HACKERS index f68101c481..4590809086 100644 --- a/ext/Devel/PPPort/HACKERS +++ b/ext/Devel/PPPort/HACKERS @@ -45,9 +45,11 @@ and linked with C<Devel::PPPort>. This C file has the purpose of using each of the public API functions/macros once. The required information is derived from C<parts/embed.fnc> (just -a copy of bleadperl's C<embed.fnc>) and C<parts/apidoc.fnc> (which +a copy of bleadperl's C<embed.fnc>), C<parts/apidoc.fnc> (which is generated by F<devel/mkapidoc.sh> and simply collects the rest -of the apidoc entries spread over the Perl source code). +of the apidoc entries spread over the Perl source code) and +C<parts/ppport.fnc> (which lists all API provided purely by +Devel::PPPort). The generated C file C<apicheck.c> is currently about 500k in size and takes quite a while to compile. diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index 77356ad584..0712ab1781 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 52 $ +# $Revision: 54 $ # $Author: mhx $ -# $Date: 2007/03/23 16:27:19 +0100 $ +# $Date: 2007/08/13 00:03:11 +0200 $ # ################################################################################ # @@ -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); @@ -125,7 +125,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.9.5}g; open FH, ">PPPort.pm" or die "PPPort.pm: $!\n"; print FH $data; @@ -344,9 +344,9 @@ __DATA__ # ################################################################################ # -# $Revision: 52 $ +# $Revision: 54 $ # $Author: mhx $ -# $Date: 2007/03/23 16:27:19 +0100 $ +# $Date: 2007/08/13 00:03:11 +0200 $ # ################################################################################ # @@ -507,7 +507,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { diff --git a/ext/Devel/PPPort/TODO b/ext/Devel/PPPort/TODO index 336e942af4..ce07d8a788 100644 --- a/ext/Devel/PPPort/TODO +++ b/ext/Devel/PPPort/TODO @@ -1,5 +1,33 @@ TODO: +* > 3. In several cases, "perl ppport.h --copy=.new" output a new file in + > which the only change was the addition of "#include "ppport.h"". In each + > case, that actually wasn't necessary because the source file in question + > already #included another source file which #included ppport.h itself. + > Would it be possible for the analyzer to follow #include directives to + > spot cases like this? + + Uh, well, I guess it would be possible. But I have some concerns: + + 1. ppport.h is already too big. :-) + + 2. There is code in ppport.h to actually remove an + + #include "ppport.h" + + if it appears not to be needed. If it's not needed in your + included file, it might be dropped from there and moved to + the other file that included the first one. This would make + the logic much more complicated. + + 3. As ppport.h is configurable, it's not (always) a good idea + to put it into a file that's included from another file. + + I guess I'll have to think about this a little more. Maybe I can + come up with a fancy solution that doesn't increase the code size + too much. + + * On 14/12/06, Nicholas Clark <nick@ccl4.org> wrote: > On Thu, Dec 14, 2006 at 05:03:24AM +0100, Andreas J. Koenig wrote: > @@ -14,6 +42,8 @@ TODO: 2. anyway, if we remove it from the core, it might appear in Devel::PPPort :) +* maybe backport bytes_from_utf8() for 5.6.0 (or even before)? + * check which of the following we need to support: amagic_generation diff --git a/ext/Devel/PPPort/devel/buildperl.pl b/ext/Devel/PPPort/devel/buildperl.pl index 64a9541e73..a85ad4feba 100644 --- a/ext/Devel/PPPort/devel/buildperl.pl +++ b/ext/Devel/PPPort/devel/buildperl.pl @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 10 $ +# $Revision: 12 $ # $Author: mhx $ -# $Date: 2006/12/02 09:58:34 +0100 $ +# $Date: 2007/08/12 15:06:31 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -32,6 +32,12 @@ use Cwd; # TODO: - extra arguments to Configure +# +# --test-archives=1 check if archives can be read +# --test-archives=2 like 1, but also extract archives +# --test-archives=3 like 2, but also apply patches +# + my %opt = ( prefix => '/tmp/perl/install/<config>/<perl>', build => '/tmp/perl/build/<config>', @@ -92,12 +98,39 @@ my @patch = ( }, { perl => [ - qr/^5\.004_0[1234]/, + qr/^5\.004_0[1234]$/, ], subs => [ [ \&patch_doio ], ], }, + { + perl => [ + qw/ + 5.005 + 5.005_01 + 5.005_02 + /, + ], + subs => [ + [ \&patch_sysv, old_format => 1 ], + ], + }, + { + perl => [ + qw/ + 5.005_03 + 5.005_04 + /, + qr/^5\.6\.[0-2]$/, + qr/^5\.7\.[0-3]$/, + qr/^5\.8\.[0-8]$/, + qr/^5\.9\.[0-5]$/ + ], + subs => [ + [ \&patch_sysv ], + ], + }, ); my(%perl, @perls); @@ -111,7 +144,7 @@ GetOptions(\%opt, qw( force test install! - test-archives+ + test-archives=i )) or pod2usage(2); if (exists $opt{config}) { @@ -149,6 +182,12 @@ if ($opt{'test-archives'}) { for my $perl (@perls) { eval { my $d = extract_source($perl{$perl}); + if ($opt{'test-archives'} > 2) { + my $cwd2 = cwd; + chdir $d or die "chdir $d: $!\n"; + patch_source($perl{$perl}{version}); + chdir $cwd2 or die "chdir $cwd2:$!\n" + } rmtree($d) if -e $d; }; warn $@ if $@; @@ -296,13 +335,13 @@ sub build_and_install sub patch_db { my $ver = shift; - print "patching DB_File\n"; + print "patching ext/DB_File/DB_File.xs\n"; run_or_die("sed -i -e 's/<db.h>/<db$ver\\/db.h>/' ext/DB_File/DB_File.xs"); } sub patch_doio { - patch('doio.c', <<'END'); + patch(<<'END'); --- doio.c.org 2004-06-07 23:14:45.000000000 +0200 +++ doio.c 2003-11-04 08:03:03.000000000 +0100 @@ -75,6 +75,16 @@ @@ -325,11 +364,52 @@ sub patch_doio END } +sub patch_sysv +{ + my %opt = @_; + + # check if patching is required + return if $^O ne 'linux' or -f '/usr/include/asm/page.h'; + + if ($opt{old_format}) { + patch(<<'END'); +--- ext/IPC/SysV/SysV.xs.org 1998-07-20 10:20:07.000000000 +0200 ++++ ext/IPC/SysV/SysV.xs 2007-08-12 10:51:06.000000000 +0200 +@@ -3,9 +3,6 @@ + #include "XSUB.h" + + #include <sys/types.h> +-#ifdef __linux__ +-#include <asm/page.h> +-#endif + #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) + #include <sys/ipc.h> + #ifdef HAS_MSG +END + } + else { + patch(<<'END'); +--- ext/IPC/SysV/SysV.xs.org 2007-08-11 00:12:46.000000000 +0200 ++++ ext/IPC/SysV/SysV.xs 2007-08-11 00:10:51.000000000 +0200 +@@ -3,9 +3,6 @@ + #include "XSUB.h" + + #include <sys/types.h> +-#ifdef __linux__ +-# include <asm/page.h> +-#endif + #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) + #ifndef HAS_SEM + # include <sys/ipc.h> +END + } +} + sub patch { - my($file, $patch) = @_; - print "patching $file\n"; - my $diff = "$file.diff"; + my($patch) = @_; + print "patching $_\n" for $patch =~ /^\+{3}\s+(\S+)/gm; + my $diff = 'tmp.diff'; write_or_die($diff, $patch); run_or_die("patch -s -p0 <$diff"); unlink $diff or die "unlink $diff: $!\n"; @@ -418,7 +498,7 @@ and don't install them, run: =head1 COPYRIGHT -Copyright (c) 2004-2006, Marcus Holland-Moritz. +Copyright (c) 2004-2007, Marcus Holland-Moritz. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/Devel/PPPort/devel/devtools.pl b/ext/Devel/PPPort/devel/devtools.pl index 076fa6f8b5..75741361f2 100644 --- a/ext/Devel/PPPort/devel/devtools.pl +++ b/ext/Devel/PPPort/devel/devtools.pl @@ -4,13 +4,13 @@ # ################################################################################ # -# $Revision: 2 $ +# $Revision: 3 $ # $Author: mhx $ -# $Date: 2006/05/28 19:33:35 +0200 $ +# $Date: 2007/08/12 08:45:38 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/ext/Devel/PPPort/devel/mkapidoc.sh b/ext/Devel/PPPort/devel/mkapidoc.sh index 356ff51206..ea53d0b7d4 100644 --- a/ext/Devel/PPPort/devel/mkapidoc.sh +++ b/ext/Devel/PPPort/devel/mkapidoc.sh @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 8 $ +# $Revision: 10 $ # $Author: mhx $ -# $Date: 2006/01/14 22:41:14 +0100 $ +# $Date: 2007/08/12 11:50:36 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -62,9 +62,26 @@ else fi if isperlroot $PERLROOT; then + cat >$OUTPUT <<EOF +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: +: !!!!! Do NOT edit this file directly! -- Edit PPPort_pm.PL instead. !!!!! +: +: This file was automatically generated from the API documentation scattered +: all over the Perl source code. To learn more about how all this works, +: please read the F<HACKERS> file that came with this distribution. +: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +: +: This file lists all API functions/macros that are documented in the Perl +: source code, but are not contained in F<embed.fnc>. +: + +EOF grep -hr '^=for apidoc' $PERLROOT | sed -e 's/=for apidoc //' | grep '|' | sort | uniq \ | perl -e'$f=pop;open(F,$f)||die"$f:$!";while(<F>){(split/\|/)[2]=~/(\w+)/;$h{$1}++} - while(<>){s/[ \t]+$//;(split/\|/)[2]=~/(\w+)/;$h{$1}||print}' $EMBED >$OUTPUT + while(<>){s/[ \t]+$//;(split/\|/)[2]=~/(\w+)/;$h{$1}||print}' $EMBED >>$OUTPUT else usage fi diff --git a/ext/Devel/PPPort/devel/mktodo b/ext/Devel/PPPort/devel/mktodo index 4dda017939..1ba706597d 100644 --- a/ext/Devel/PPPort/devel/mktodo +++ b/ext/Devel/PPPort/devel/mktodo @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 13 $ +# $Revision: 14 $ # $Author: mhx $ -# $Date: 2006/05/28 19:36:03 +0200 $ +# $Date: 2007/08/12 08:45:40 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/ext/Devel/PPPort/devel/mktodo.pl b/ext/Devel/PPPort/devel/mktodo.pl index 326923d08d..773badcd99 100644 --- a/ext/Devel/PPPort/devel/mktodo.pl +++ b/ext/Devel/PPPort/devel/mktodo.pl @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 13 $ +# $Revision: 14 $ # $Author: mhx $ -# $Date: 2006/05/28 19:39:10 +0200 $ +# $Date: 2007/08/12 08:45:39 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # diff --git a/ext/Devel/PPPort/devel/regenerate b/ext/Devel/PPPort/devel/regenerate index bdbda8b3a9..4a40d8487f 100644 --- a/ext/Devel/PPPort/devel/regenerate +++ b/ext/Devel/PPPort/devel/regenerate @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 5 $ +# $Revision: 6 $ # $Author: mhx $ -# $Date: 2006/05/28 20:43:04 +0200 $ +# $Date: 2007/08/12 08:45:39 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -148,7 +148,7 @@ regenerate - Automatically regeneate Devel::PPPort's API information =head1 COPYRIGHT -Copyright (c) 2006, Marcus Holland-Moritz. +Copyright (c) 2006-2007, Marcus Holland-Moritz. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/Devel/PPPort/devel/scanprov b/ext/Devel/PPPort/devel/scanprov index fb5bc791a2..66f207c4e2 100644 --- a/ext/Devel/PPPort/devel/scanprov +++ b/ext/Devel/PPPort/devel/scanprov @@ -5,13 +5,13 @@ # ################################################################################ # -# $Revision: 6 $ +# $Revision: 7 $ # $Author: mhx $ -# $Date: 2006/01/14 22:41:14 +0100 $ +# $Date: 2007/08/12 08:45:15 +0200 $ # ################################################################################ # -# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz. +# Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. # Version 2.x, Copyright (C) 2001, Paul Marquess. # Version 1.x, Copyright (C) 1999, Kenneth Albanowski. # @@ -27,7 +27,7 @@ die "Usage: $0 [check|write]\n" unless @ARGV && $ARGV[0] =~ /^(check|write)$/; my $mode = $1; my %embed = map { ( $_->{name} => 1 ) } - parse_embed(qw(parts/embed.fnc parts/apidoc.fnc)); + parse_embed(qw(parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc )); my @provided = grep { !exists $embed{$_} } map { /^(\w+)/ ? $1 : () } diff --git a/ext/Devel/PPPort/parts/apicheck.pl b/ext/Devel/PPPort/parts/apicheck.pl index 215e568278..41ac35ad3d 100644 --- a/ext/Devel/PPPort/parts/apicheck.pl +++ b/ext/Devel/PPPort/parts/apicheck.pl @@ -5,9 +5,9 @@ # ################################################################################ # -# $Revision: 22 $ +# $Revision: 25 $ # $Author: mhx $ -# $Date: 2007/01/02 12:32:28 +0100 $ +# $Date: 2007/08/12 23:23:40 +0200 $ # ################################################################################ # @@ -31,7 +31,7 @@ else { *OUT = \*STDOUT; } -my @f = parse_embed(qw( parts/embed.fnc parts/apidoc.fnc )); +my @f = parse_embed(qw( parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc )); my %todo = %{&parse_todo}; @@ -141,23 +141,27 @@ print OUT <<HEAD; #else +#define NEED_PL_signals #define NEED_eval_pv #define NEED_grok_bin #define NEED_grok_hex #define NEED_grok_number #define NEED_grok_numeric_radix #define NEED_grok_oct +#define NEED_load_module #define NEED_my_snprintf #define NEED_my_strlcat #define NEED_my_strlcpy #define NEED_newCONSTSUB #define NEED_newRV_noinc -#define NEED_sv_2pv_nolen +#define NEED_sv_2pv_flags +#define NEED_sv_pvn_force_flags #define NEED_sv_2pvbyte #define NEED_sv_catpvf_mg #define NEED_sv_catpvf_mg_nocontext #define NEED_sv_setpvf_mg #define NEED_sv_setpvf_mg_nocontext +#define NEED_vload_module #define NEED_vnewSVpvf #define NEED_warner diff --git a/ext/Devel/PPPort/parts/apidoc.fnc b/ext/Devel/PPPort/parts/apidoc.fnc index 5daf5c3e34..3347f31809 100644 --- a/ext/Devel/PPPort/parts/apidoc.fnc +++ b/ext/Devel/PPPort/parts/apidoc.fnc @@ -16,23 +16,13 @@ Am|bool|strNE|char* s1|char* s2 Am|bool|strnEQ|char* s1|char* s2|STRLEN len Am|bool|strnNE|char* s1|char* s2|STRLEN len Am|bool|SvIOK_notUV|SV* sv -Am|bool|SvIOKp|SV* sv -Am|bool|SvIOK|SV* sv Am|bool|SvIOK_UV|SV* sv Am|bool|SvIsCOW_shared_hash|SV* sv Am|bool|SvIsCOW|SV* sv -Am|bool|SvNIOKp|SV* sv -Am|bool|SvNIOK|SV* sv -Am|bool|SvNOKp|SV* sv -Am|bool|SvNOK|SV* sv -Am|bool|SvOK|SV* sv -Am|bool|SvOOK|SV* sv -Am|bool|SvPOKp|SV* sv -Am|bool|SvPOK|SV* sv -Am|bool|SvROK|SV* sv +Am|bool|SvRXOK|SV* sv Am|bool|SvTAINTED|SV* sv Am|bool|SvTRUE|SV* sv -Am|bool|SvUTF8|SV* sv +Am|bool|SvUOK|SV* sv Am|bool|SvVOK|SV* sv Am|char*|HePV|HE* he|STRLEN len Am|char*|HvNAME|HV* stash @@ -89,6 +79,7 @@ Am|NV|SvNVx|SV* sv Am|NV|SvNVX|SV* sv Amn|(whatever)|RETVAL Amn|(whatever)|THIS +Am|REGEXP *|SvRX|SV *sv Ams||dAX Ams||dAXMARK Ams||dITEMS @@ -134,7 +125,19 @@ Ams||XSRETURN_UNDEF Ams||XSRETURN_YES Ams||XS_VERSION_BOOTCHECK Am|U32|HeHASH|HE* he +Am|U32|SvIOKp|SV* sv +Am|U32|SvIOK|SV* sv +Am|U32|SvNIOKp|SV* sv +Am|U32|SvNIOK|SV* sv +Am|U32|SvNOKp|SV* sv +Am|U32|SvNOK|SV* sv +Am|U32|SvOK|SV* sv +Am|U32|SvOOK|SV* sv +Am|U32|SvPOKp|SV* sv +Am|U32|SvPOK|SV* sv Am|U32|SvREFCNT|SV* sv +Am|U32|SvROK|SV* sv +Am|U32|SvUTF8|SV* sv AmU||G_ARRAY AmU||G_DISCARD AmU||G_EVAL @@ -245,7 +248,6 @@ Am|void|SvTAINTED_off|SV* sv Am|void|SvTAINTED_on|SV* sv Am|void|SvTAINT|SV* sv Am|void|SvUNLOCK|SV* sv -Am|void|SvUOK|SV* sv Am|void|SvUPGRADE|SV* sv|svtype type Am|void|SvUTF8_off|SV *sv Am|void|SvUTF8_on|SV *sv diff --git a/ext/Devel/PPPort/parts/base/5005000 b/ext/Devel/PPPort/parts/base/5005000 index 8d1ad77002..ace76746bb 100644 --- a/ext/Devel/PPPort/parts/base/5005000 +++ b/ext/Devel/PPPort/parts/base/5005000 @@ -30,7 +30,6 @@ EXTERN_C # added by devel/scanprov NOOP # added by devel/scanprov PL_DBsignal # added by devel/scanprov PL_Sv # added by devel/scanprov -PL_copline # added by devel/scanprov PL_hexdigit # added by devel/scanprov PL_hints # added by devel/scanprov PL_laststatval # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5006000 b/ext/Devel/PPPort/parts/base/5006000 index 6a3c111c7b..d05e245adc 100644 --- a/ext/Devel/PPPort/parts/base/5006000 +++ b/ext/Devel/PPPort/parts/base/5006000 @@ -116,7 +116,6 @@ my_atof # E my_fflush_all # E newANONATTRSUB # E newATTRSUB # E -newPADOP # E newSVnv # E (Perl_newSVnv) newSVpvf # E (Perl_newSVpvf) newSVuv # E @@ -129,7 +128,6 @@ op_dump # E perl_parse # E (perl_parse) pmop_dump # E pv_display # E -re_intuit_start # E re_intuit_string # E reginitcolors # E require_pv # E (perl_require_pv) diff --git a/ext/Devel/PPPort/parts/base/5007001 b/ext/Devel/PPPort/parts/base/5007001 index 08d952b802..ae0d4b2733 100644 --- a/ext/Devel/PPPort/parts/base/5007001 +++ b/ext/Devel/PPPort/parts/base/5007001 @@ -22,3 +22,4 @@ utf8n_to_uvuni # U uvuni_to_utf8 # U PTR2ul # added by devel/scanprov UVXf # added by devel/scanprov +SV_IMMEDIATE_UNREF # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5007002 b/ext/Devel/PPPort/parts/base/5007002 index b56a2628ff..9d31a24f09 100644 --- a/ext/Devel/PPPort/parts/base/5007002 +++ b/ext/Devel/PPPort/parts/base/5007002 @@ -47,7 +47,6 @@ PERL_MAGIC_ext # added by devel/scanprov PERL_MAGIC_fm # added by devel/scanprov PERL_MAGIC_isa # added by devel/scanprov PERL_MAGIC_isaelem # added by devel/scanprov -PERL_MAGIC_mutex # added by devel/scanprov PERL_MAGIC_nkeys # added by devel/scanprov PERL_MAGIC_overload # added by devel/scanprov PERL_MAGIC_overload_elem # added by devel/scanprov @@ -69,3 +68,6 @@ PERL_MAGIC_uvar # added by devel/scanprov PERL_MAGIC_vec # added by devel/scanprov PERL_UNUSED_DECL # added by devel/scanprov PERL_UNUSED_VAR # added by devel/scanprov +SV_GMAGIC # added by devel/scanprov +SvPV_flags # added by devel/scanprov +SvPV_force_flags # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5008001 b/ext/Devel/PPPort/parts/base/5008001 index 420b56c26b..57ff6a796a 100644 --- a/ext/Devel/PPPort/parts/base/5008001 +++ b/ext/Devel/PPPort/parts/base/5008001 @@ -2,11 +2,11 @@ SvVOK # U XSRETURN_UV # U doing_taint # U +find_runcv # U is_utf8_string_loc # U packlist # U save_bool # U savestack_grow_cnt # U -scan_vstring # U seed # U sv_cat_decode # U sv_compile_2op # E (Perl_sv_compile_2op) @@ -22,3 +22,5 @@ PERL_SCAN_SILENT_ILLDIGIT # added by devel/scanprov PERL_SIGNALS_UNSAFE_FLAG # added by devel/scanprov PL_signals # added by devel/scanprov XST_mUV # added by devel/scanprov +SV_COW_DROP_PV # added by devel/scanprov +SV_UTF8_NO_ENCODING # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5009000 b/ext/Devel/PPPort/parts/base/5009000 index 86f67f6e56..28bc85958e 100644 --- a/ext/Devel/PPPort/parts/base/5009000 +++ b/ext/Devel/PPPort/parts/base/5009000 @@ -1,8 +1,6 @@ 5.009000 new_version # U save_set_svflags # U -upg_version # U vcmp # U vnumify # U vstringify # U -WARN_ASSERTIONS # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5009002 b/ext/Devel/PPPort/parts/base/5009002 index 1b5b8f9fe3..26ce0e7c57 100644 --- a/ext/Devel/PPPort/parts/base/5009002 +++ b/ext/Devel/PPPort/parts/base/5009002 @@ -28,3 +28,5 @@ op_refcnt_unlock # U savesvpv # U vnormal # U MY_CXT_CLONE # added by devel/scanprov +UTF8_MAXBYTES # added by devel/scanprov +SV_NOSTEAL # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5009003 b/ext/Devel/PPPort/parts/base/5009003 index 320fdfdf1a..0bd2b615f2 100644 --- a/ext/Devel/PPPort/parts/base/5009003 +++ b/ext/Devel/PPPort/parts/base/5009003 @@ -42,3 +42,19 @@ STR_WITH_LEN # added by devel/scanprov SvPVX_const # added by devel/scanprov SvPVX_mutable # added by devel/scanprov dVAR # added by devel/scanprov +SV_CONST_RETURN # added by devel/scanprov +SV_MUTABLE_RETURN # added by devel/scanprov +SV_SMAGIC # added by devel/scanprov +SvPV_const # added by devel/scanprov +SvPV_flags_const # added by devel/scanprov +SvPV_flags_const_nolen # added by devel/scanprov +SvPV_flags_mutable # added by devel/scanprov +SvPV_force_flags_mutable # added by devel/scanprov +SvPV_force_flags_nolen # added by devel/scanprov +SvPV_force_mutable # added by devel/scanprov +SvPV_force_nolen # added by devel/scanprov +SvPV_force_nomg_nolen # added by devel/scanprov +SvPV_mutable # added by devel/scanprov +SvPV_nolen_const # added by devel/scanprov +SvPV_nomg_const # added by devel/scanprov +SvPV_nomg_const_nolen # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5009004 b/ext/Devel/PPPort/parts/base/5009004 index 0fc781435c..61a171f587 100644 --- a/ext/Devel/PPPort/parts/base/5009004 +++ b/ext/Devel/PPPort/parts/base/5009004 @@ -26,3 +26,4 @@ sv_usepvn_flags # U PERL_UNUSED_CONTEXT # added by devel/scanprov PERL_USE_GCC_BRACE_GROUPS # added by devel/scanprov SvVSTRING_mg # added by devel/scanprov +SV_HAS_TRAILING_NUL # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/base/5009005 b/ext/Devel/PPPort/parts/base/5009005 index e2876ae6d5..ef39541cd4 100644 --- a/ext/Devel/PPPort/parts/base/5009005 +++ b/ext/Devel/PPPort/parts/base/5009005 @@ -2,8 +2,50 @@ MULTICALL # E POP_MULTICALL # E PUSH_MULTICALL # E +Perl_signbit # U +SvRX # U +SvRXOK # U +av_create_and_push # U +av_create_and_unshift_one # U +get_cvn_flags # U +gv_fetchfile_flags # U hv_assert # U +mro_get_linear_isa # U +mro_get_linear_isa_c3 # U +mro_get_linear_isa_dfs # U +mro_method_changed_in # U +my_dirfd # U +newSV_type # U pad_sv # U +pregcomp # E (Perl_pregcomp) +ptr_table_clear # U +ptr_table_fetch # U +ptr_table_free # U +ptr_table_new # U +ptr_table_split # U +ptr_table_store # U +re_compile # U +re_intuit_start # E (Perl_re_intuit_start) +reg_named_buff_all # U +reg_named_buff_exists # U +reg_named_buff_fetch # U +reg_named_buff_firstkey # U +reg_named_buff_nextkey # U +reg_named_buff_scalar # U +reg_stringify # U +regfree_internal # U +savesharedpvn # U +scan_vstring # E (Perl_scan_vstring) stashpv_hvname_match # U +sv_magic_portable # U +upg_version # E (Perl_upg_version) PERL_BCDVERSION # added by devel/scanprov PERL_MAGIC_glob # added by devel/scanprov +PERL_MAGIC_mutex # added by devel/scanprov +PL_copline # added by devel/scanprov +PL_expect # added by devel/scanprov +WARN_ASSERTIONS # added by devel/scanprov +aTHXR # added by devel/scanprov +aTHXR_ # added by devel/scanprov +dTHXR # added by devel/scanprov +SV_COW_SHARED_HASH_KEYS # added by devel/scanprov diff --git a/ext/Devel/PPPort/parts/embed.fnc b/ext/Devel/PPPort/parts/embed.fnc index 284bf44b08..efd9242b86 100644 --- a/ext/Devel/PPPort/parts/embed.fnc +++ b/ext/Devel/PPPort/parts/embed.fnc @@ -106,11 +106,13 @@ Apd |void |av_fill |NN AV* ar|I32 fill ApdR |I32 |av_len |NN const AV* ar ApdR |AV* |av_make |I32 size|NN SV** svp Apd |SV* |av_pop |NN AV* ar +ApdoxM |void |av_create_and_push|NN AV **const avp|NN SV *const val Apd |void |av_push |NN AV* ar|NN SV* val -p |void |av_reify |NN AV* ar +EXp |void |av_reify |NN AV* ar ApdR |SV* |av_shift |NN AV* ar Apd |SV** |av_store |NN AV* ar|I32 key|NULLOK SV* val Apd |void |av_undef |NN AV* ar +ApdoxM |SV** |av_create_and_unshift_one|NN AV **const avp|NN SV *const val Apd |void |av_unshift |NN AV* ar|I32 num Apo |SV** |av_arylen_p |NN AV* av pR |OP* |bind_match |I32 type|NN OP* left|NN OP* pat @@ -266,6 +268,7 @@ p |OP* |gen_constant_list|NULLOK OP* o #if !defined(HAS_GETENV_LEN) p |char* |getenv_len |NN const char* key|NN unsigned long *len #endif +pox |void |get_db_sub |NULLOK SV **svp|NN CV *cv Ap |void |gp_free |NULLOK GV* gv Ap |GP* |gp_ref |NULLOK GP* gp Ap |GV* |gv_AVadd |NN GV* gv @@ -277,6 +280,8 @@ Ap |void |gv_efullname |NN SV* sv|NN const GV* gv Apmb |void |gv_efullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix Ap |void |gv_efullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain Ap |GV* |gv_fetchfile |NN const char* name +Ap |GV* |gv_fetchfile_flags|NN const char *const name|const STRLEN len\ + |const U32 flags Apd |GV* |gv_fetchmeth |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level Apd |GV* |gv_fetchmeth_autoload |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level Apdmb |GV* |gv_fetchmethod |NULLOK HV* stash|NN const char* name @@ -288,9 +293,9 @@ Ap |void |gv_fullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool pMox |GP * |newGP |NN GV *const gv Ap |void |gv_init |NN GV* gv|NULLOK HV* stash|NN const char* name|STRLEN len|int multi Ap |void |gv_name_set |NN GV* gv|NN const char *name|U32 len|U32 flags -Apd |HV* |gv_stashpv |NN const char* name|I32 create -Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 create -Apd |HV* |gv_stashsv |NULLOK SV* sv|I32 create +Apd |HV* |gv_stashpv |NN const char* name|I32 flags +Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 flags +Apd |HV* |gv_stashsv |NULLOK SV* sv|I32 flags Apd |void |hv_clear |NULLOK HV* tb poM |HV * |hv_copy_hints_hv|NN HV *const ohv Ap |void |hv_delayfree_ent|NN HV* hv|NULLOK HE* entry @@ -310,8 +315,8 @@ ApMdR |HE* |hv_iternext_flags|NN HV* tb|I32 flags ApdR |SV* |hv_iterval |NN HV* tb|NN HE* entry Ap |void |hv_ksplit |NN HV* hv|IV newmax Apdbm |void |hv_magic |NN HV* hv|NULLOK GV* gv|int how -dpoM |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c -XEpoM |SV * |refcounted_he_fetch|NN const struct refcounted_he *chain \ +XEdpoM |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c +XEpoM |SV * |refcounted_he_fetch|NULLOK const struct refcounted_he *chain \ |NULLOK SV *keysv|NULLOK const char *key \ |STRLEN klen, int flags, U32 hash dpoM |void |refcounted_he_free|NULLOK struct refcounted_he *he @@ -397,10 +402,10 @@ ApR |bool |is_utf8_mark |NN const U8 *p p |OP* |jmaybe |NN OP* arg pP |I32 |keyword |NN const char* d|I32 len|bool all_keywords Ap |void |leave_scope |I32 base -p |void |lex_end -p |void |lex_start |NN SV* line +EXp |void |lex_end +p |void |lex_start |NULLOK SV* line|NULLOK PerlIO *rsfp|bool new_filter Ap |void |op_null |NN OP* o -p |void |op_clear |NN OP* o +EXp |void |op_clear |NN OP* o Ap |void |op_refcnt_lock Ap |void |op_refcnt_unlock p |OP* |linklist |NN OP* o @@ -473,7 +478,7 @@ p |char* |mem_collxfrm |NN const char* s|STRLEN len|NN STRLEN* xlen #endif Afp |SV* |mess |NN const char* pat|... Ap |SV* |vmess |NN const char* pat|NULLOK va_list* args -p |void |qerror |NN SV* err +EXp |void |qerror |NN SV* err Apd |void |sortsv |NN SV** array|size_t num_elts|NN SVCOMPARE_t cmp Apd |void |sortsv_flags |NN SV** array|size_t num_elts|NN SVCOMPARE_t cmp|U32 flags Apd |int |mg_clear |NN SV* sv @@ -487,7 +492,7 @@ Apd |void |mg_magical |NN SV* sv Apd |int |mg_set |NN SV* sv Ap |I32 |mg_size |NN SV* sv Ap |void |mini_mktime |NN struct tm *pm -p |OP* |mod |NULLOK OP* o|I32 type +EXp |OP* |mod |NULLOK OP* o|I32 type p |int |mode_from_discipline|NULLOK SV* discp Ap |char* |moreswitches |NN char* s p |OP* |my |NN OP* o @@ -563,7 +568,9 @@ ApdaR |HV* |newHV ApaR |HV* |newHVhv |NULLOK HV* hv Apa |IO* |newIO Apa |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last -Apa |OP* |newPADOP |I32 type|I32 flags|NULLOK SV* sv +#ifdef USE_ITHREADS +Apa |OP* |newPADOP |I32 type|I32 flags|NN SV* sv +#endif Apa |OP* |newPMOP |I32 type|I32 flags Apa |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv Apa |SV* |newRV |NN SV* sv @@ -582,16 +589,17 @@ Afpda |SV* |newSVpvf |NN const char* pat|... Apa |SV* |vnewSVpvf |NN const char* pat|NULLOK va_list* args Apd |SV* |newSVrv |NN SV* rv|NULLOK const char* classname Apda |SV* |newSVsv |NULLOK SV* old +Apda |SV* |newSV_type |svtype type Apa |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first Apa |OP* |newWHENOP |NULLOK OP* cond|NN OP* block Apa |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \ |I32 whileline|NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \ |I32 has_my Apa |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems -Ap |char* |scan_vstring |NN const char *vstr|NN SV *sv +Ap |char* |scan_vstring |NN const char *vstr|NN const char *end|NN SV *sv Apd |const char* |scan_version |NN const char *vstr|NN SV *sv|bool qv Apd |SV* |new_version |NN SV *ver -Apd |SV* |upg_version |NN SV *ver +Apd |SV* |upg_version |NN SV *ver|bool qv Apd |bool |vverify |NN SV *vs Apd |SV* |vnumify |NN SV *vs Apd |SV* |vnormal |NN SV *vs @@ -638,7 +646,8 @@ Apd |I32 |eval_sv |NN SV* sv|I32 flags Apd |SV* |get_sv |NN const char* name|I32 create Apd |AV* |get_av |NN const char* name|I32 create Apd |HV* |get_hv |NN const char* name|I32 create -Apd |CV* |get_cv |NN const char* name|I32 create +Apd |CV* |get_cv |NN const char* name|I32 flags +Apd |CV* |get_cvn_flags |NN const char* name|STRLEN len|I32 flags Ap |int |init_i18nl10n |int printwarn Ap |int |init_i18nl14n |int printwarn Ap |void |new_collate |NULLOK const char* newcoll @@ -663,25 +672,46 @@ Ap |void |push_scope Amb |OP* |ref |NULLOK OP* o|I32 type p |OP* |refkids |NULLOK OP* o|I32 type Ap |void |regdump |NN const regexp* r +Ap |void |regdump |NN const regexp* r Ap |SV* |regclass_swash |NULLOK const regexp *prog|NN const struct regnode *n|bool doinit|NULLOK SV **listsvp|NULLOK SV **altsvp -Ap |I32 |pregexec |NN regexp* prog|NN char* stringarg \ +Ap |I32 |pregexec |NN REGEXP * const prog|NN char* stringarg \ |NN char* strend|NN char* strbeg|I32 minend \ |NN SV* screamer|U32 nosave Ap |void |pregfree |NULLOK struct regexp* r -p |char * |reg_stringify |NN MAGIC *mg|NULLOK STRLEN *lp|NULLOK U32 *flags|NULLOK I32 *haseval +EXp |struct regexp* |reg_temp_copy |NN struct regexp* r +Ap |void |regfree_internal|NULLOK REGEXP * const r +Ap |char * |reg_stringify |NN MAGIC *mg|NULLOK STRLEN *lp|NULLOK U32 *flags|NULLOK I32 *haseval #if defined(USE_ITHREADS) -Ap |regexp*|regdupe |NN const regexp* r|NN CLONE_PARAMS* param -#endif -Ap |regexp*|pregcomp |NN char* exp|NN char* xend|NN PMOP* pm -Ap |char* |re_intuit_start|NN regexp* prog|NULLOK SV* sv|NN char* strpos \ - |NN char* strend|U32 flags \ - |NULLOK struct re_scream_pos_data_s *data -Ap |SV* |re_intuit_string|NN regexp* prog -Ap |I32 |regexec_flags |NN regexp* prog|NN char* stringarg \ +Ap |void* |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param +#endif +Ap |REGEXP*|pregcomp |NN const SV * const pattern|const U32 flags +Ap |REGEXP*|re_compile |NN const SV * const pattern|const U32 flags +Ap |char* |re_intuit_start|NN REGEXP * const rx|NULLOK SV* sv|NN char* strpos \ + |NN char* strend|const U32 flags \ + |NULLOK re_scream_pos_data *data +Ap |SV* |re_intuit_string|NN REGEXP * const rx +Ap |I32 |regexec_flags |NN REGEXP * const rx|NN char* stringarg \ |NN char* strend|NN char* strbeg|I32 minend \ |NN SV* screamer|NULLOK void* data|U32 flags ApR |regnode*|regnext |NN regnode* p -Ep |SV*|reg_named_buff_sv |NN SV* namesv + +EXp |SV*|reg_named_buff |NN REGEXP * const rx|NULLOK SV * const key \ + |NULLOK SV * const value|const U32 flags +EXp |SV*|reg_named_buff_iter |NN REGEXP * const rx|NULLOK const SV * const lastkey \ + |const U32 flags +Ap |SV*|reg_named_buff_fetch |NN REGEXP * const rx|NN SV * const namesv|const U32 flags +Ap |bool|reg_named_buff_exists |NN REGEXP * const rx|NN SV * const key|const U32 flags +Ap |SV*|reg_named_buff_firstkey |NN REGEXP * const rx|const U32 flags +Ap |SV*|reg_named_buff_nextkey |NN REGEXP * const rx|const U32 flags +Ap |SV*|reg_named_buff_scalar |NN REGEXP * const rx|const U32 flags +Ap |SV*|reg_named_buff_all |NN REGEXP * const rx|const U32 flags + +EXp |void|reg_numbered_buff_fetch|NN REGEXP * const rx|const I32 paren|NULLOK SV * const sv +EXp |void|reg_numbered_buff_store|NN REGEXP * const rx|const I32 paren|NULLOK SV const * const value +EXp |I32|reg_numbered_buff_length|NN REGEXP * const rx|NN const SV * const sv|const I32 paren + +EXp |SV*|reg_qr_package|NN REGEXP * const rx + Ep |void |regprop |NULLOK const regexp *prog|NN SV* sv|NN const regnode* o Ap |void |repeatcpy |NN char* to|NN const char* from|I32 len|I32 count ApP |char* |rninstr |NN const char* big|NN const char* bigend \ @@ -699,6 +729,7 @@ p |I32 |same_dirent |NN const char* a|NN const char* b Apda |char* |savepv |NULLOK const char* pv Apda |char* |savepvn |NULLOK const char* pv|I32 len Apda |char* |savesharedpv |NULLOK const char* pv +Apda |char* |savesharedpvn |NN const char *const pv|const STRLEN len Apda |char* |savesvpv |NN SV* sv Ap |void |savestack_grow Ap |void |savestack_grow_cnt |I32 need @@ -755,7 +786,7 @@ Ap |char* |screaminstr |NN SV *bigstr|NN SV *littlestr|I32 start_shift \ #if !defined(VMS) p |I32 |setenv_getix |NN const char* nam #endif -p |void |setdefout |NULLOK GV* gv +EXp |void |setdefout |NULLOK GV* gv Ap |HEK* |share_hek |NN const char* str|I32 len|U32 hash #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) np |Signal_t |sighandler |int sig|... @@ -830,7 +861,7 @@ Apd |STRLEN |sv_len |NULLOK SV* sv Apd |STRLEN |sv_len_utf8 |NULLOK SV* sv Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \ |I32 namlen -Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK MGVTBL *vtbl \ +Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK const MGVTBL *vtbl \ |NULLOK const char* name|I32 namlen ApdaR |SV* |sv_mortalcopy |NULLOK SV* oldsv ApdR |SV* |sv_newmortal @@ -898,7 +929,7 @@ Apd |I32 |unpack_str |NN const char *pat|NN const char *patend|NN const char *s Apd |I32 |unpackstring |NN const char *pat|NN const char *patend|NN const char *s \ |NN const char *strend|U32 flags Ap |void |unsharepvn |NULLOK const char* sv|I32 len|U32 hash -XEp |void |unshare_hek |NULLOK HEK* hek +p |void |unshare_hek |NULLOK HEK* hek #ifdef PERL_MAD p |OP * |utilize |int aver|I32 floor|NULLOK OP* version \ |NN OP* idop|NULLOK OP* arg @@ -935,14 +966,14 @@ Ap |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags Apd |U8* |uvuni_to_utf8_flags |NN U8 *d|UV uv|UV flags Apd |char* |pv_uni_display |NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags ApdR |char* |sv_uni_display |NN SV *dsv|NN SV *ssv|STRLEN pvlim|UV flags -p |void |vivify_defelem |NN SV* sv +EXp |void |vivify_defelem |NN SV* sv p |void |vivify_ref |NN SV* sv|U32 to_what p |I32 |wait4pid |Pid_t pid|NN int* statusp|int flags p |U32 |parse_unicode_opts|NN const char **popt Ap |U32 |seed pR |UV |get_hash_seed p |void |report_evil_fh |NULLOK const GV *gv|NULLOK const IO *io|I32 op -pd |void |report_uninit |NULLOK SV* uninit_sv +XEpd |void |report_uninit |NULLOK SV* uninit_sv Afpd |void |warn |NN const char* pat|... Ap |void |vwarn |NN const char* pat|NULLOK va_list* args Afp |void |warner |U32 err|NN const char* pat|... @@ -951,8 +982,9 @@ p |void |watch |NN char** addr Ap |I32 |whichsig |NN const char* sig p |void |write_to_stderr|NN const char* message|int msglen p |int |yyerror |NN const char* s -p |int |yylex +EXp |int |yylex p |int |yyparse +p |void |parser_free |NN const yy_parser * p |int |yywarn |NN const char* s #if defined(MYMALLOC) Ap |void |dump_mstats |NN char* s @@ -999,9 +1031,12 @@ Apd |char* |pv_pretty |NN SV *dsv|NN char const * const str\ Afp |void |dump_indent |I32 level|NN PerlIO *file|NN const char* pat|... Ap |void |dump_vindent |I32 level|NN PerlIO *file|NN const char* pat \ |NULLOK va_list *args -Ap |void |do_gv_dump |I32 level|NN PerlIO *file|NN const char *name|NN GV *sv -Ap |void |do_gvgv_dump |I32 level|NN PerlIO *file|NN const char *name|NN GV *sv -Ap |void |do_hv_dump |I32 level|NN PerlIO *file|NN const char *name|NN HV *sv +Ap |void |do_gv_dump |I32 level|NN PerlIO *file|NN const char *name\ + |NULLOK GV *sv +Ap |void |do_gvgv_dump |I32 level|NN PerlIO *file|NN const char *name\ + |NULLOK GV *sv +Ap |void |do_hv_dump |I32 level|NN PerlIO *file|NN const char *name\ + |NULLOK HV *sv Ap |void |do_magic_dump |I32 level|NN PerlIO *file|NN const MAGIC *mg|I32 nest \ |I32 maxnest|bool dumpops|STRLEN pvlim Ap |void |do_op_dump |I32 level|NN PerlIO *file|NULLOK const OP *o @@ -1049,12 +1084,15 @@ ApR |GP* |gp_dup |NULLOK GP* gp|NN CLONE_PARAMS* param ApR |MAGIC* |mg_dup |NULLOK MAGIC* mg|NN CLONE_PARAMS* param ApR |SV* |sv_dup |NULLOK const SV* sstr|NN CLONE_PARAMS* param Ap |void |rvpv_dup |NN SV* dstr|NN const SV *sstr|NN CLONE_PARAMS* param +Ap |yy_parser*|parser_dup |NN const yy_parser *proto|NN CLONE_PARAMS* param +#endif Apa |PTR_TBL_t*|ptr_table_new ApR |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NN const void *sv Ap |void |ptr_table_store|NN PTR_TBL_t *tbl|NULLOK const void *oldsv|NN void *newsv Ap |void |ptr_table_split|NN PTR_TBL_t *tbl Ap |void |ptr_table_clear|NULLOK PTR_TBL_t *tbl Ap |void |ptr_table_free|NULLOK PTR_TBL_t *tbl +#if defined(USE_ITHREADS) # if defined(HAVE_INTERP_INTERN) Ap |void |sys_intern_dup |NN struct interp_intern* src|NN struct interp_intern* dst # endif @@ -1064,12 +1102,8 @@ Ap |void |sys_intern_clear Ap |void |sys_intern_init #endif -ApR |char * |custom_op_name |NN const OP* op -ApR |char * |custom_op_desc |NN const OP* op - -#if defined(PERL_OLD_COPY_ON_WRITE) -pMX |int |sv_release_IVX |NN SV *sv -#endif +ApR |const char * |custom_op_name |NN const OP* op +ApR |const char * |custom_op_desc |NN const OP* op Adp |void |sv_nosharing |NULLOK SV *sv Adpbm |void |sv_nolocking |NULLOK SV *sv @@ -1093,11 +1127,12 @@ sR |I32 |do_trans_complex_utf8 |NN SV * const sv #if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT) s |void |gv_init_sv |NN GV *gv|I32 sv_type -s |void |require_errno |NN GV *gv +s |HV* |require_tie_mod|NN GV *gv|NN const char *varpv|NN SV* namesv \ + |NN const char *methpv|const U32 flags #endif : #if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) -paRxo |void* |get_arena |int svtype +paRxo |void* |get_arena |size_t svtype|U32 misc : #endif #if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT) @@ -1154,6 +1189,7 @@ pR |OP* |ck_match |NN OP *o pR |OP* |ck_method |NN OP *o pR |OP* |ck_null |NN OP *o pR |OP* |ck_open |NN OP *o +pR |OP* |ck_readline |NN OP *o pR |OP* |ck_repeat |NN OP *o pR |OP* |ck_require |NN OP *o pR |OP* |ck_retarget |NN OP *o @@ -1173,6 +1209,12 @@ pR |OP* |ck_trunc |NN OP *o pR |OP* |ck_unpack |NN OP *o sRn |bool |is_handle_constructor|NN const OP *o|I32 numargs sR |I32 |is_list_assignment|NULLOK const OP *o +# ifdef USE_ITHREADS +so |void |forget_pmop |NN PMOP *const o|U32 flags +# else +so |void |forget_pmop |NN PMOP *const o +# endif +s |void |find_and_forget_pmops |NN OP *o s |void |cop_free |NN COP *cop s |OP* |modkids |NULLOK OP *o|I32 type s |OP* |scalarboolean |NN OP *o @@ -1195,19 +1237,28 @@ s |OP* |newGIVWHENOP |NULLOK OP* cond|NN OP *block \ |I32 enter_opcode|I32 leave_opcode \ |PADOFFSET entertarg s |OP* |ref_array_or_hash|NULLOK OP* cond +s |void |process_special_blocks |NN const char *const fullname\ + |NN GV *const gv|NN CV *const cv #endif #if defined(PL_OP_SLAB_ALLOC) -Apa |void* |Slab_Alloc |int m|size_t sz +Apa |void* |Slab_Alloc |size_t sz Ap |void |Slab_Free |NN void *op +# if defined(PERL_DEBUG_READONLY_OPS) +poxM |void |pending_Slabs_to_ro +poxM |OP * |op_refcnt_inc |NULLOK OP *o +poxM |PADOFFSET |op_refcnt_dec |NN OP *o +# if defined(PERL_IN_OP_C) +s |void |Slab_to_rw |NN void *op +# endif +# endif #endif #if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT) -s |void |find_beginning +s |void |find_beginning |NN SV* linestr_sv|NN PerlIO *rsfp s |void |forbid_setid |const char flag|const int suidscript s |void |incpush |NULLOK const char *dir|bool addsubdirs|bool addoldvers|bool usesep|bool canrelocate s |void |init_interp s |void |init_ids -s |void |init_lexer s |void |init_main_stash s |void |init_perllib s |void |init_postdump_symbols|int argc|NN char **argv|NULLOK char **env @@ -1215,11 +1266,13 @@ s |void |init_predump_symbols rs |void |my_exit_jump s |void |nuke_stacks s |int |open_script |NN const char *scriptname|bool dosearch \ - |NN SV *sv|NN int *suidscript + |NN SV *sv|NN int *suidscript|NN PerlIO **rsfpp s |void |usage |NN const char *name s |void |validate_suid |NN const char *validarg \ |NN const char *scriptname|int fdscript \ - |int suidscript + |int suidscript|NN SV* linestr_sv \ + |NN PerlIO *rsfp + # if defined(IAMSUID) s |int |fd_on_nosuid_fs|int fd # endif @@ -1231,6 +1284,10 @@ s |SV * |incpush_if_exists|NN SV *dir #if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT) sR |SV* |refto |NN SV* sv #endif +#if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT) +pRxo |GV* |softref2xv |NN SV *const sv|NN const char *const what \ + |const U32 type|NN SV ***spp +#endif #if defined(PERL_IN_PP_PACK_C) || defined(PERL_DECL_PROT) s |I32 |unpack_rec |NN struct tempsym* symptr|NN const char *s \ @@ -1263,7 +1320,7 @@ sR |I32 |dopoptosub |I32 startingblock sR |I32 |dopoptosub_at |NN const PERL_CONTEXT* cxstk|I32 startingblock sR |I32 |dopoptowhen |I32 startingblock s |void |save_lines |NULLOK AV *array|NN SV *sv -sR |OP* |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq +s |bool |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq sR |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode sR |PerlIO *|doopen_pm |NN const char *name|NN const char *mode sRn |bool |path_is_absolute|NN const char *name @@ -1276,7 +1333,6 @@ s |OP* |do_smartmatch |NULLOK HV* seen_this|NULLOK HV* seen_other #if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT) s |void |do_oddball |NN HV *hash|NN SV **relem|NN SV **firstrelem -sR |CV* |get_db_sub |NN SV **svp|NN CV *cv sR |SV* |method_common |NN SV* meth|NULLOK U32* hashp #endif @@ -1311,16 +1367,17 @@ Es |STRLEN |reguni |NN const struct RExC_state_t *state|UV uv|NN char *s Es |regnode*|regclass |NN struct RExC_state_t *state|U32 depth ERsn |I32 |regcurly |NN const char * Es |regnode*|reg_node |NN struct RExC_state_t *state|U8 op -Es |UV |reg_recode |const char value|NULLOK SV **encp +Es |UV |reg_recode |const char value|NN SV **encp Es |regnode*|regpiece |NN struct RExC_state_t *state|NN I32 *flagp|U32 depth Es |regnode*|reg_namedseq |NN struct RExC_state_t *state|NULLOK UV *valuep Es |void |reginsert |NN struct RExC_state_t *state|U8 op|NN regnode *opnd|U32 depth Es |void |regtail |NN struct RExC_state_t *state|NN regnode *p|NN const regnode *val|U32 depth Es |SV * |reg_scan_name |NN struct RExC_state_t *state|U32 flags Es |U32 |join_exact |NN struct RExC_state_t *state|NN regnode *scan|NN I32 *min|U32 flags|NULLOK regnode *val|U32 depth -EsRn |char* |regwhite |NN char *p|NN const char *e -Es |char* |nextchar |NN struct RExC_state_t *state -Es |void |scan_commit |NN const struct RExC_state_t* state|NN struct scan_data_t *data|NN I32 *minlenp +EsRn |char * |regwhite |NN struct RExC_state_t *state|NN char *p +Es |char * |nextchar |NN struct RExC_state_t *state +Es |bool |reg_skipcomment|NN struct RExC_state_t *state +Es |void |scan_commit |NN const struct RExC_state_t* state|NN struct scan_data_t *data|NN I32 *minlenp|int is_inf Esn |void |cl_anything |NN const struct RExC_state_t* state|NN struct regnode_charclass_class *cl EsRn |int |cl_is_anything |NN const struct regnode_charclass_class *cl Esn |void |cl_init |NN const struct RExC_state_t* state|NN struct regnode_charclass_class *cl @@ -1345,6 +1402,7 @@ Es |I32 |make_trie |NN struct RExC_state_t* state|NN regnode *startbranch \ Es |void |make_trie_failtable |NN struct RExC_state_t* state \ |NN regnode *source|NN regnode *node|U32 depth # ifdef DEBUGGING +Es |void |regdump_extflags|NULLOK const char *lead| const U32 flags Es |const regnode*|dumpuntil|NN const regexp *r|NN const regnode *start \ |NN const regnode *node \ |NULLOK const regnode *last \ @@ -1378,6 +1436,7 @@ ERsn |U8* |reghop4 |NN U8 *pos|I32 off|NN const U8 *llim|NN const U8 *rlim #endif ERsn |U8* |reghopmaybe3 |NN U8 *pos|I32 off|NN const U8 *lim ERs |char* |find_byclass |NN regexp * prog|NN const regnode *c|NN char *s|NN const char *strend|NULLOK regmatch_info *reginfo +Es |void |swap_match_buff|NN regexp * prog Es |void |to_utf8_substr |NN regexp * prog Es |void |to_byte_substr |NN regexp * prog ERs |I32 |reg_check_named_buff_matched |NN const regexp *rex|NN const regnode *prog @@ -1389,7 +1448,7 @@ Es |void |debug_start_match|NN const regexp *prog|const bool do_utf8|NN const ch #endif #if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT) -s |CV* |deb_curcv |I32 ix +s |CV* |deb_curcv |const I32 ix s |void |debprof |NN const OP *o s |void |sequence |NULLOK const OP *o s |void |sequence_tail |NULLOK const OP *o @@ -1438,16 +1497,14 @@ s |STRLEN |sv_pos_b2u_midway|NN const U8 *s|NN const U8 *const target \ |NN const U8 *end|STRLEN endu sn |char * |F0convert |NV nv|NN char *endbuf|NN STRLEN *len # if defined(PERL_OLD_COPY_ON_WRITE) -sM |void |sv_release_COW |NN SV *sv|NN const char *pvx|STRLEN len|NN SV *after +sM |void |sv_release_COW |NN SV *sv|NN const char *pvx|NN SV *after # endif s |SV * |more_sv s |void * |more_bodies |svtype sv_type s |bool |sv_2iuv_common |NN SV *sv s |void |glob_assign_glob|NN SV *dstr|NN SV *sstr|const int dtype s |void |glob_assign_ref|NN SV *dstr|NN SV *sstr -# if defined(USE_ITHREADS) sRn |PTR_TBL_ENT_t *|ptr_table_find|NN PTR_TBL_t *tbl|NN const void *sv -# endif #endif #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) @@ -1457,7 +1514,6 @@ s |char* |force_version |NN char *start|int guessing s |char* |force_word |NN char *start|int token|int check_keyword \ |int allow_pack|int allow_tick s |SV* |tokeq |NN SV *sv -s |int |pending_ident s |void |readpipe_override| sR |char* |scan_const |NN char *start sR |char* |scan_formline |NN char *s @@ -1471,13 +1527,15 @@ sR |char* |scan_subst |NN char *start sR |char* |scan_trans |NN char *start s |char* |scan_word |NN char *s|NN char *dest|STRLEN destlen \ |int allow_package|NN STRLEN *slp +s |void |update_debugger_info|NULLOK SV *orig_sv \ + |NULLOK const char *buf|STRLEN len sR |char* |skipspace |NN char *s sR |char* |swallow_bom |NN U8 *s s |void |checkcomma |NN const char *s|NN const char *name \ |NN const char *what s |bool |feature_is_enabled|NN const char* name|STRLEN namelen s |void |force_ident |NN const char *s|int kind -s |void |incline |NN char *s +s |void |incline |NN const char *s s |int |intuit_method |NN char *s|NULLOK GV *gv|NULLOK CV *cv s |int |intuit_more |NN char *s s |I32 |lop |I32 f|int x|NN char *s @@ -1505,7 +1563,7 @@ s |void |printbuf |NN const char* fmt|NN const char* s #endif #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT) -s |bool|isa_lookup |NULLOK HV *stash|NN const char *name|NULLOK const HV * const name_stash|int len|int level +s |bool|isa_lookup |NULLOK HV *stash|NN const char * const name|NULLOK const HV * const name_stash #endif #if defined(PERL_IN_LOCALE_C) || defined(PERL_DECL_PROT) @@ -1544,6 +1602,7 @@ Apd |char* |sv_pvn_force_flags|NN SV* sv|NULLOK STRLEN* lp|I32 flags Apd |void |sv_copypv |NN SV* dsv|NN SV* ssv Ap |char* |my_atof2 |NN const char *s|NN NV* value Apn |int |my_socketpair |int family|int type|int protocol|int fd[2] +Ap |int |my_dirfd |NULLOK DIR* dir #ifdef PERL_OLD_COPY_ON_WRITE pMXE |SV* |sv_setsv_cow |NN SV* dsv|NN SV* ssv #endif @@ -1608,7 +1667,7 @@ sd |PADOFFSET|pad_findlex |NN const char *name|NN const CV* cv|U32 seq|int warn sd |void |cv_dump |NN const CV *cv|NN const char *title # endif #endif -pdR |CV* |find_runcv |NULLOK U32 *db_seqp +ApdR |CV* |find_runcv |NULLOK U32 *db_seqp p |void |free_tied_hv_pool #if defined(DEBUGGING) pR |int |get_debug_opts |NN const char **s|bool givehelp @@ -1745,8 +1804,13 @@ Apnod |int |my_vsnprintf |NN char *buffer|const Size_t len|NN const char *format px |void |my_clearenv #ifdef PERL_IMPLICIT_CONTEXT +#ifdef PERL_GLOBAL_STRUCT_PRIVATE +Apo |void* |my_cxt_init |NN const char *my_cxt_key|size_t size +Apo |int |my_cxt_index |NN const char *my_cxt_key +#else Apo |void* |my_cxt_init |NN int *index|size_t size #endif +#endif #ifndef HAS_STRLCAT Apno |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size @@ -1772,7 +1836,7 @@ Mp |void |xmldump_sub |NN const GV* gv Mp |void |xmldump_form |NN const GV* gv Mp |void |xmldump_eval Mp |char* |sv_catxmlsv |NN SV *dsv|NN SV *ssv -Mp |char* |sv_catxmlpvn |NN SV *dsv|NN char *pv|STRLEN len|int utf8 +Mp |char* |sv_catxmlpvn |NN SV *dsv|NN const char *pv|STRLEN len|int utf8 Mp |char* |sv_xmlpeek |NN SV* sv Mp |void |do_pmop_xmldump|I32 level|NN PerlIO *file \ |NULLOK const PMOP *pm @@ -1804,6 +1868,23 @@ s |void |curmad |char slot|NULLOK SV *sv Mp |int |madlex Mp |int |madparse #endif +#if !defined(HAS_SIGNBIT) +AMdnoP |int |Perl_signbit |NV f +#endif + +XEMop |void |emulate_cop_io |NN const COP *const c|NN SV *const sv +XEMop |REGEXP *|get_re_arg|NULLOK SV *sv + +p |struct mro_meta* |mro_meta_init |NN HV* stash +#if defined(USE_ITHREADS) +p |struct mro_meta* |mro_meta_dup |NN struct mro_meta* smeta|NN CLONE_PARAMS* param +#endif +Apd |AV* |mro_get_linear_isa|NN HV* stash +Apd |AV* |mro_get_linear_isa_c3|NN HV* stash|I32 level +Apd |AV* |mro_get_linear_isa_dfs|NN HV* stash|I32 level +pd |void |mro_isa_changed_in|NN HV* stash +Apd |void |mro_method_changed_in |NN HV* stash +p |void |boot_core_mro END_EXTERN_C /* diff --git a/ext/Devel/PPPort/parts/inc/SvPV b/ext/Devel/PPPort/parts/inc/SvPV index bc635f143c..19d82fc82a 100644 --- a/ext/Devel/PPPort/parts/inc/SvPV +++ b/ext/Devel/PPPort/parts/inc/SvPV @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 14 $ +## $Revision: 15 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:33 +0100 $ +## $Date: 2007/08/12 23:57:47 +0200 $ ## ################################################################################ ## @@ -17,38 +17,31 @@ =provides -SvPV_nolen -sv_2pv_nolen +__UNDEFINED__ SvPVbyte sv_2pvbyte -sv_pvn -sv_pvn_force +sv_2pv_flags +sv_pvn_force_flags -=implementation - -#ifndef SvPV_nolen +=dontwarn -#if { NEED sv_2pv_nolen } +NEED_sv_2pv_flags -char * -sv_2pv_nolen(pTHX_ register SV *sv) -{ - STRLEN n_a; - return sv_2pv(sv, &n_a); -} +=implementation +/* Backwards compatibility stuff... :-( */ +#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen) +# define NEED_sv_2pv_flags +#endif +#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL) +# define NEED_sv_2pv_flags_GLOBAL #endif /* Hint: sv_2pv_nolen - * Use the SvPV_nolen() macro instead of sv_2pv_nolen(). + * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen(). */ -/* SvPV_nolen depends on sv_2pv_nolen */ -#define SvPV_nolen(sv) \ - ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ - ? SvPVX(sv) : sv_2pv_nolen(sv)) - -#endif +__UNDEFINED__ sv_2pv_nolen(sv) SvPV_nolen(sv) #ifdef SvPVbyte @@ -76,7 +69,6 @@ sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) #undef SvPVbyte -/* SvPVbyte depends on sv_2pvbyte */ #define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp)) @@ -90,8 +82,7 @@ sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) #endif -/* sv_2pvbyte_nolen depends on sv_2pv_nolen */ -__UNDEFINED__ sv_2pvbyte_nolen sv_2pv_nolen +__UNDEFINED__ sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv) /* Hint: sv_pvn * Always use the SvPV() macro instead of sv_pvn(). @@ -103,9 +94,101 @@ __UNDEFINED__ sv_pvn(sv, len) SvPV(sv, len) */ __UNDEFINED__ sv_pvn_force(sv, len) SvPV_force(sv, len) +/* If these are undefined, they're not handled by the core anyway */ +__UNDEFINED__ SV_IMMEDIATE_UNREF 0 +__UNDEFINED__ SV_GMAGIC 0 +__UNDEFINED__ SV_COW_DROP_PV 0 +__UNDEFINED__ SV_UTF8_NO_ENCODING 0 +__UNDEFINED__ SV_NOSTEAL 0 +__UNDEFINED__ SV_CONST_RETURN 0 +__UNDEFINED__ SV_MUTABLE_RETURN 0 +__UNDEFINED__ SV_SMAGIC 0 +__UNDEFINED__ SV_HAS_TRAILING_NUL 0 +__UNDEFINED__ SV_COW_SHARED_HASH_KEYS 0 + +#if { VERSION < 5.7.2 } + +#if { NEED sv_2pv_flags } + +char * +sv_2pv_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags) +{ + STRLEN n_a = (STRLEN) flags; + return sv_2pv(sv, lp ? lp : &n_a); +} + +#endif + +#if { NEED sv_pvn_force_flags } + +char * +sv_pvn_force_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags) +{ + STRLEN n_a = (STRLEN) flags; + return sv_pvn_force(sv, lp ? lp : &n_a); +} + +#endif + +#endif + +__UNDEFINED__ SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC) +__UNDEFINED__ SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC) + +__UNDEFINED__ SvPV_flags(sv, lp, flags) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags)) + +__UNDEFINED__ SvPV_flags_const(sv, lp, flags) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \ + (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN)) + +__UNDEFINED__ SvPV_flags_const_nolen(sv, flags) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX_const(sv) : \ + (const char*) sv_2pv_flags(sv, 0, flags|SV_CONST_RETURN)) + +__UNDEFINED__ SvPV_flags_mutable(sv, lp, flags) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \ + sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) + +__UNDEFINED__ SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC) +__UNDEFINED__ SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC) +__UNDEFINED__ SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC) +__UNDEFINED__ SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0) +__UNDEFINED__ SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0) + +__UNDEFINED__ SvPV_force_flags(sv, lp, flags) \ + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ + ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags)) + +__UNDEFINED__ SvPV_force_flags_nolen(sv, flags) \ + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ + ? SvPVX(sv) : sv_pvn_force_flags(sv, 0, flags)) + +__UNDEFINED__ SvPV_force_flags_mutable(sv, lp, flags) \ + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ + ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \ + : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) + +__UNDEFINED__ SvPV_nolen(sv) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC)) + +__UNDEFINED__ SvPV_nolen_const(sv) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX_const(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC|SV_CONST_RETURN)) + +__UNDEFINED__ SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0) +__UNDEFINED__ SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0) +__UNDEFINED__ SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0) + =xsinit -#define NEED_sv_2pv_nolen +#define NEED_sv_2pv_flags +#define NEED_sv_pvn_force_flags #define NEED_sv_2pvbyte =xsubs @@ -114,8 +197,8 @@ IV SvPVbyte(sv) SV *sv PREINIT: + char *str; STRLEN len; - const char *str; CODE: str = SvPVbyte(sv, len); RETVAL = strEQ(str, "mhx") ? (IV) len : (IV) -1; @@ -126,15 +209,252 @@ IV SvPV_nolen(sv) SV *sv PREINIT: - const char *str; + char *str; CODE: str = SvPV_nolen(sv); RETVAL = strEQ(str, "mhx") ? 42 : 0; OUTPUT: RETVAL -=tests plan => 2 +IV +SvPV_const(sv) + SV *sv + PREINIT: + const char *str; + STRLEN len; + CODE: + str = SvPV_const(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 40 : 0); + OUTPUT: + RETVAL + +IV +SvPV_mutable(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_mutable(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 41 : 0); + OUTPUT: + RETVAL + +IV +SvPV_flags(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_flags(sv, len, SV_GMAGIC); + RETVAL = len + (strEQ(str, "mhx") ? 42 : 0); + OUTPUT: + RETVAL + +IV +SvPV_flags_const(sv) + SV *sv + PREINIT: + const char *str; + STRLEN len; + CODE: + str = SvPV_flags_const(sv, len, SV_GMAGIC); + RETVAL = len + (strEQ(str, "mhx") ? 43 : 0); + OUTPUT: + RETVAL + +IV +SvPV_flags_const_nolen(sv) + SV *sv + PREINIT: + const char *str; + CODE: + str = SvPV_flags_const_nolen(sv, SV_GMAGIC); + RETVAL = strEQ(str, "mhx") ? 47 : 0; + OUTPUT: + RETVAL + +IV +SvPV_flags_mutable(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_flags_mutable(sv, len, SV_GMAGIC); + RETVAL = len + (strEQ(str, "mhx") ? 45 : 0); + OUTPUT: + RETVAL + +IV +SvPV_force(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_force(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 46 : 0); + OUTPUT: + RETVAL + +IV +SvPV_force_nolen(sv) + SV *sv + PREINIT: + char *str; + CODE: + str = SvPV_force_nolen(sv); + RETVAL = strEQ(str, "mhx") ? 50 : 0; + OUTPUT: + RETVAL + +IV +SvPV_force_mutable(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_force_mutable(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 48 : 0); + OUTPUT: + RETVAL + +IV +SvPV_force_nomg(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_force_nomg(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 49 : 0); + OUTPUT: + RETVAL + +IV +SvPV_force_nomg_nolen(sv) + SV *sv + PREINIT: + char *str; + CODE: + str = SvPV_force_nomg_nolen(sv); + RETVAL = strEQ(str, "mhx") ? 53 : 0; + OUTPUT: + RETVAL + +IV +SvPV_force_flags(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_force_flags(sv, len, SV_GMAGIC); + RETVAL = len + (strEQ(str, "mhx") ? 51 : 0); + OUTPUT: + RETVAL + +IV +SvPV_force_flags_nolen(sv) + SV *sv + PREINIT: + char *str; + CODE: + str = SvPV_force_flags_nolen(sv, SV_GMAGIC); + RETVAL = strEQ(str, "mhx") ? 55 : 0; + OUTPUT: + RETVAL + +IV +SvPV_force_flags_mutable(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_force_flags_mutable(sv, len, SV_GMAGIC); + RETVAL = len + (strEQ(str, "mhx") ? 53 : 0); + OUTPUT: + RETVAL + +IV +SvPV_nolen_const(sv) + SV *sv + PREINIT: + const char *str; + CODE: + str = SvPV_nolen_const(sv); + RETVAL = strEQ(str, "mhx") ? 57 : 0; + OUTPUT: + RETVAL + +IV +SvPV_nomg(sv) + SV *sv + PREINIT: + char *str; + STRLEN len; + CODE: + str = SvPV_nomg(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 55 : 0); + OUTPUT: + RETVAL + +IV +SvPV_nomg_const(sv) + SV *sv + PREINIT: + const char *str; + STRLEN len; + CODE: + str = SvPV_nomg_const(sv, len); + RETVAL = len + (strEQ(str, "mhx") ? 56 : 0); + OUTPUT: + RETVAL + +IV +SvPV_nomg_const_nolen(sv) + SV *sv + PREINIT: + const char *str; + CODE: + str = SvPV_nomg_const_nolen(sv); + RETVAL = strEQ(str, "mhx") ? 60 : 0; + OUTPUT: + RETVAL + + +=tests plan => 20 + +my $mhx = "mhx"; + +ok(&Devel::PPPort::SvPVbyte($mhx), 3); + +my $i = 42; + +ok(&Devel::PPPort::SvPV_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_mutable($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++); + +ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++); +ok(&Devel::PPPort::SvPV_force($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++); + +ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++); -ok(&Devel::PPPort::SvPVbyte("mhx"), 3); -ok(&Devel::PPPort::SvPV_nolen("mhx"), 42); +ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++); diff --git a/ext/Devel/PPPort/parts/inc/call b/ext/Devel/PPPort/parts/inc/call index 0b19ae41cc..daba216c34 100644 --- a/ext/Devel/PPPort/parts/inc/call +++ b/ext/Devel/PPPort/parts/inc/call @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 12 $ +## $Revision: 14 $ ## $Author: mhx $ -## $Date: 2007/03/23 17:57:58 +0100 $ +## $Date: 2007/08/12 23:57:09 +0200 $ ## ################################################################################ ## @@ -43,7 +43,6 @@ __UNDEFINED__ PERL_LOADMOD_IMPORT_OPS 0x4 /* Replace: 0 */ /* Replace perl_eval_pv with eval_pv */ -/* eval_pv depends on eval_sv */ #ifndef eval_pv #if { NEED eval_pv } @@ -130,8 +129,6 @@ vload_module(U32 flags, SV *name, SV *ver, va_list *args) #endif #endif -/* load_module depends on vload_module */ - #ifndef load_module #if { NEED load_module } @@ -276,9 +273,8 @@ load_module(flags, name, version, ...) CODE: /* Both SV parameters are donated to the ops built inside load_module, so we need to bump the refcounts. */ - SvREFCNT_inc(name); - SvREFCNT_inc(version); - Perl_load_module(aTHX_ flags, name, version, NULL); + Perl_load_module(aTHX_ flags, SvREFCNT_inc_simple(name), + SvREFCNT_inc_simple(version), NULL); =tests plan => 46 diff --git a/ext/Devel/PPPort/parts/inc/grok b/ext/Devel/PPPort/parts/inc/grok index 33fb14ded4..dce2467aba 100644 --- a/ext/Devel/PPPort/parts/inc/grok +++ b/ext/Devel/PPPort/parts/inc/grok @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 11 $ +## $Revision: 13 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:34 +0100 $ +## $Date: 2007/08/12 23:57:10 +0200 $ ## ################################################################################ ## @@ -38,7 +38,6 @@ __UNDEFINED__ IS_NUMBER_NEG 0x08 __UNDEFINED__ IS_NUMBER_INFINITY 0x10 __UNDEFINED__ IS_NUMBER_NAN 0x20 -/* GROK_NUMERIC_RADIX depends on grok_numeric_radix */ __UNDEFINED__ GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) __UNDEFINED__ PERL_SCAN_GREATER_THAN_UV_MAX 0x02 @@ -89,8 +88,6 @@ grok_numeric_radix(pTHX_ const char **sp, const char *send) #endif #endif -/* grok_number depends on grok_numeric_radix */ - #ifndef grok_number #if { NEED grok_number } int diff --git a/ext/Devel/PPPort/parts/inc/magic b/ext/Devel/PPPort/parts/inc/magic index dff0a48fde..b6358cb68d 100644 --- a/ext/Devel/PPPort/parts/inc/magic +++ b/ext/Devel/PPPort/parts/inc/magic @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 11 $ +## $Revision: 13 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:34 +0100 $ +## $Date: 2007/08/12 23:24:34 +0200 $ ## ################################################################################ ## @@ -19,6 +19,7 @@ __UNDEFINED__ /sv_\w+_mg/ +sv_magic_portable =implementation @@ -65,8 +66,6 @@ __UNDEFINED__ PERL_MAGIC_backref '<' __UNDEFINED__ PERL_MAGIC_ext '~' /* That's the best we can do... */ -__UNDEFINED__ SvPV_force_nomg SvPV_force -__UNDEFINED__ SvPV_nomg SvPV __UNDEFINED__ sv_catpvn_nomg sv_catpvn __UNDEFINED__ sv_catsv_nomg sv_catsv __UNDEFINED__ sv_setsv_nomg sv_setsv @@ -166,6 +165,44 @@ __UNDEFINED__ SvUV_nomg SvUV __UNDEFINED__ SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL) +/* Hint: sv_magic_portable + * This is a compatibility function that is only available with + * Devel::PPPort. It is NOT in the perl core. + * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when + * it is being passed a name pointer with namlen == 0. In that + * case, perl 5.8.0 and later store the pointer, not a copy of it. + * The compatibility can be provided back to perl 5.004. With + * earlier versions, the code will not compile. + */ + +#if { VERSION < 5.004 } + + /* code that uses sv_magic_portable will not compile */ + +#elif { VERSION < 5.8.0 } + +# define sv_magic_portable(sv, obj, how, name, namlen) \ + STMT_START { \ + if (name && namlen == 0) \ + { \ + MAGIC *mg; \ + sv_magic(sv, obj, how, 0, 0); \ + mg = SvMAGIC(sv); \ + mg->mg_len = -42; /* XXX: this is the tricky part */ \ + mg->mg_ptr = name; \ + } \ + else \ + { \ + sv_magic(sv, obj, how, name, namlen); \ + } \ + } STMT_END + +#else + +# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e) + +#endif + =xsubs void @@ -260,7 +297,27 @@ SvVSTRING_mg(sv) OUTPUT: RETVAL -=tests plan => 13 +int +sv_magic_portable(sv) + SV *sv + PREINIT: + MAGIC *mg; + const char *foo = "foo"; + CODE: +#if { VERSION >= 5.004 } + sv_magic_portable(sv, 0, '~', foo, 0); + mg = mg_find(sv, '~'); + RETVAL = mg->mg_ptr == foo; +#else + sv_magic(sv, 0, '~', foo, strlen(foo)); + mg = mg_find(sv, '~'); + RETVAL = strEQ(mg->mg_ptr, foo); +#endif + sv_unmagic(sv, '~'); + OUTPUT: + RETVAL + +=tests plan => 15 use Tie::Hash; my %h; @@ -303,3 +360,7 @@ ok($[ < 5.009 || $@ eq ''); ok($@ || Devel::PPPort::SvVSTRING_mg($ver)); ok(!Devel::PPPort::SvVSTRING_mg(4711)); +my $foo = 'bar'; +ok(Devel::PPPort::sv_magic_portable($foo)); +ok($foo eq 'bar'); + diff --git a/ext/Devel/PPPort/parts/inc/misc b/ext/Devel/PPPort/parts/inc/misc index 72a108544b..847445ec34 100644 --- a/ext/Devel/PPPort/parts/inc/misc +++ b/ext/Devel/PPPort/parts/inc/misc @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 38 $ +## $Revision: 39 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:34 +0100 $ +## $Date: 2007/07/18 13:09:15 +0200 $ ## ################################################################################ ## @@ -37,6 +37,7 @@ END_EXTERN_C EXTERN_C STMT_START STMT_END +UTF8_MAXBYTES XSRETURN =implementation @@ -213,6 +214,8 @@ __UNDEFINED__ dVAR dNOOP __UNDEFINED__ SVf "_" +__UNDEFINED__ UTF8_MAXBYTES UTF8_MAXLEN + =xsmisc XS(XS_Devel__PPPort_dXSTARG); /* prototype */ diff --git a/ext/Devel/PPPort/parts/inc/ppphbin b/ext/Devel/PPPort/parts/inc/ppphbin index e10a71e08d..d1b4dc5174 100644 --- a/ext/Devel/PPPort/parts/inc/ppphbin +++ b/ext/Devel/PPPort/parts/inc/ppphbin @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 35 $ +## $Revision: 40 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:33 +0100 $ +## $Date: 2007/08/12 23:58:21 +0200 $ ## ################################################################################ ## @@ -102,21 +102,55 @@ if (exists $opt{'list-unsupported'}) { # Scan for possible replacement candidates -my(%replace, %need, %hints, %depends); +my(%replace, %need, %hints, %warnings, %depends); my $replace = 0; -my $hint = ''; +my($hint, $define, $function); while (<DATA>) { if ($hint) { + my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; if (m{^\s*\*\s(.*?)\s*$}) { - $hints{$hint} ||= ''; # suppress warning with older perls - $hints{$hint} .= "$1\n"; + for (@{$hint->[1]}) { + $h->{$_} ||= ''; # suppress warning with older perls + $h->{$_} .= "$1\n"; + } + } + else { + undef $hint; + } + } + + $hint = [$1, [split /,?\s+/, $2]] if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}; + + if ($define) { + if ($define->[1] =~ /\\$/) { + $define->[1] .= $_; + } + else { + if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { + my @n = grep { exists $API{$_} } $define->[1] =~ /(\w+)/mg; + push @{$depends{$define->[0]}}, @n if @n + } + undef $define; + } + } + + $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)}; + + if ($function) { + if (/^}/) { + if (exists $API{$function->[0]}) { + my @n = grep { exists $API{$_} } $function->[1] =~ /(\w+)/mg; + push @{$depends{$function->[0]}}, @n if @n + } + undef $define; } else { - $hint = ''; + $function->[1] .= $_; } } - $hint = $1 if m{^\s*$rccs\sHint:\s+(\w+)\s*$}; + + $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)}; $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)}; @@ -130,6 +164,11 @@ while (<DATA>) { $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; } +for (values %depends) { + my %s; + $_ = [sort grep !$s{$_}++, @$_]; +} + if (exists $opt{'api-info'}) { my $f; my $count = 0; @@ -148,7 +187,8 @@ if (exists $opt{'api-info'}) { print "Support by $ppport provided back to perl-$todo.\n"; print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; - print "$hints{$f}" if exists $hints{$f}; + print "\n$hints{$f}" if exists $hints{$f}; + print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f}; $info++; } unless ($info) { @@ -173,6 +213,7 @@ if (exists $opt{'list-provided'}) { push @flags, 'explicit' if exists $need{$f}; push @flags, 'depend' if exists $depends{$f}; push @flags, 'hint' if exists $hints{$f}; + push @flags, 'warning' if exists $warnings{$f}; my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; print "$f$flags\n"; } @@ -180,23 +221,35 @@ if (exists $opt{'list-provided'}) { } my @files; -my @srcext = qw( xs c h cc cpp ); -my $srcext = join '|', @srcext; +my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc ); +my $srcext = join '|', map { quotemeta $_ } @srcext; if (@ARGV) { my %seen; - @files = grep { -f && !exists $seen{$_} } map { glob $_ } @ARGV; + for (@ARGV) { + if (-e) { + if (-f) { + push @files, $_ unless $seen{$_}++; + } + else { warn "'$_' is not a file.\n" } + } + else { + my @new = grep { -f } glob $_ + or warn "'$_' does not exist.\n"; + push @files, grep { !$seen{$_}++ } @new; + } + } } else { eval { require File::Find; File::Find::find(sub { - $File::Find::name =~ /\.($srcext)$/i + $File::Find::name =~ /($srcext)$/i and push @files, $File::Find::name; }, '.'); }; if ($@) { - @files = map { glob "*.$_" } @srcext; + @files = map { glob "*$_" } @srcext; } } @@ -204,7 +257,7 @@ if (!@ARGV || $opt{filter}) { my(@in, @out); my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; for (@files) { - my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/\.($srcext)$/i; + my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i; push @{ $out ? \@out : \@in }, $_; } if (@ARGV && @out) { @@ -269,6 +322,7 @@ for $filename (@files) { $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func}; $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; if (exists $API{$func}{provided}) { + $file{uses_provided}{$func}++; if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { $file{uses}{$func}++; my @deps = rec_depend($func); @@ -336,6 +390,7 @@ for $filename (@files) { my %file = %{$files{$filename}}; my $func; my $c = $file{code}; + my $warnings = 0; for $func (sort keys %{$file{uses_Perl}}) { if ($API{$func}{varargs}) { @@ -358,24 +413,24 @@ for $filename (@files) { $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); } - for $func (sort keys %{$file{uses}}) { - next unless $file{uses}{$func}; # if it's only a dependency - if (exists $file{uses_deps}{$func}) { - diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); - } - elsif (exists $replace{$func}) { - warning("Uses $func instead of $replace{$func}"); - $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); - } - else { - diag("Uses $func"); + for $func (sort keys %{$file{uses_provided}}) { + if ($file{uses}{$func}) { + if (exists $file{uses_deps}{$func}) { + diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); + } + else { + diag("Uses $func"); + } } - hint($func); + $warnings += hint($func); } - for $func (sort keys %{$file{uses_todo}}) { - warning("Uses $func, which may not be portable below perl ", - format_version($API{$func}{todo})); + unless ($opt{quiet}) { + for $func (sort keys %{$file{uses_todo}}) { + print "*** WARNING: Uses $func, which may not be portable below perl ", + format_version($API{$func}{todo}), ", even with '$ppport'\n"; + $warnings++; + } } for $func (sort keys %{$file{needed_static}}) { @@ -474,6 +529,10 @@ for $filename (@files) { warning("Uses $cppc C++ style comment$s, which is not portable"); } + my $s = $warnings != 1 ? 's' : ''; + my $warn = $warnings ? " ($warnings warning$s)" : ''; + info("Analysis completed$warn"); + if ($file{changes}) { if (exists $opt{copy}) { my $newfile = "$filename$opt{copy}"; @@ -689,16 +748,24 @@ sub error } my %given_hints; +my %given_warnings; sub hint { $opt{quiet} and return; - $opt{hints} or return; my $func = shift; - exists $hints{$func} or return; - $given_hints{$func}++ and return; - my $hint = $hints{$func}; - $hint =~ s/^/ /mg; - print " --- hint for $func ---\n", $hint; + my $rv = 0; + if (exists $warnings{$func} && !$given_warnings{$func}++) { + my $warn = $warnings{$func}; + $warn =~ s!^!*** !mg; + print "*** WARNING: $func\n", $warn; + $rv++; + } + if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) { + my $hint = $hints{$func}; + $hint =~ s/^/ /mg; + print " --- hint for $func ---\n", $hint; + } + $rv; } sub usage diff --git a/ext/Devel/PPPort/parts/inc/ppphdoc b/ext/Devel/PPPort/parts/inc/ppphdoc index 1da2931a34..4154c7c076 100644 --- a/ext/Devel/PPPort/parts/inc/ppphdoc +++ b/ext/Devel/PPPort/parts/inc/ppphdoc @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 28 $ +## $Revision: 30 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:32 +0100 $ +## $Date: 2007/05/22 21:26:46 +0200 $ ## ################################################################################ ## @@ -88,7 +88,10 @@ to be installed on your system. If this option is given, a copy of each file will be saved with the given suffix that contains the suggested changes. This does -not require any external programs. +not require any external programs. Note that this does not +automagially add a dot between the original filename and the +suffix. If you want the dot, you have to include it in the option +argument. If neither C<--patch> or C<--copy> are given, the default is to simply print the diffs for each file. This requires either @@ -127,7 +130,7 @@ alerts will be printed. =head2 --nohints Don't output any hints. Hints often contain useful portability -notes. +notes. Warnings will still be displayed. =head2 --nochanges @@ -154,7 +157,7 @@ module is installed. Lists the API elements for which compatibility is provided by F<ppport.h>. Also lists if it must be explicitly requested, -if it has dependencies, and if there are hints for it. +if it has dependencies, and if there are hints or warnings for it. =head2 --list-unsupported @@ -271,6 +274,10 @@ the C<--diff> option: This would output context diffs with 10 lines of context. +If you want to create patched copies of your files instead, use: + + perl ppport.h --copy=.new + To display portability information for the C<newSVpvn> function, use: diff --git a/ext/Devel/PPPort/parts/inc/ppphtest b/ext/Devel/PPPort/parts/inc/ppphtest index c176474a8b..9534508b4e 100644 --- a/ext/Devel/PPPort/parts/inc/ppphtest +++ b/ext/Devel/PPPort/parts/inc/ppphtest @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 34 $ +## $Revision: 38 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:32 +0100 $ +## $Date: 2007/08/12 23:58:29 +0200 $ ## ################################################################################ ## @@ -15,11 +15,11 @@ ## ################################################################################ -=tests plan => 203 +=tests plan => 221 BEGIN { if ($ENV{'SKIP_SLOW_TESTS'}) { - for (1 .. 203) { + for (1 .. 221) { skip("skip: SKIP_SLOW_TESTS", 0); } exit 0; @@ -270,9 +270,9 @@ ok($o =~ /^Scanning.*file1\.xs/mi); ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o =~ /^Uses newCONSTSUB/m); -ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m); +ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m); +ok($o =~ /WARNING: PL_expect/m); ok($o =~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --nohints file1.xs)); @@ -280,9 +280,9 @@ ok($o =~ /^Scanning.*file1\.xs/mi); ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o =~ /^Uses newCONSTSUB/m); -ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m); +ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m); +ok($o =~ /WARNING: PL_expect/m); ok($o !~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --nohints --nodiag file1.xs)); @@ -291,8 +291,8 @@ ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o !~ /^Uses newCONSTSUB/m); ok($o !~ /^Uses SvPV_nolen/m); +ok($o =~ /WARNING: PL_expect/m); ok($o !~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --quiet file1.xs)); @@ -331,11 +331,12 @@ ok($o =~ /^\s*$/); ---------------------------- file1.xs ----------------------------------------- #define NEED_newCONSTSUB -#define NEED_sv_2pv_nolen +#define NEED_sv_2pv_flags #include "ppport.h" newCONSTSUB(); SvPV_nolen(); +PL_expect = 0; ---------------------------- file2.xs ----------------------------------------- @@ -673,12 +674,14 @@ ok(not ref $p{call_sv}); ok(exists $p{grok_bin}); ok(ref $p{grok_bin}, 'HASH'); -ok(scalar keys %{$p{grok_bin}}, 1); +ok(scalar keys %{$p{grok_bin}}, 2); ok($p{grok_bin}{explicit}); +ok($p{grok_bin}{depend}); ok(exists $p{gv_stashpvn}); ok(ref $p{gv_stashpvn}, 'HASH'); -ok(scalar keys %{$p{gv_stashpvn}}, 1); +ok(scalar keys %{$p{gv_stashpvn}}, 2); +ok($p{gv_stashpvn}{depend}); ok($p{gv_stashpvn}{hint}); ok(exists $p{sv_catpvf_mg}); @@ -687,6 +690,11 @@ ok(scalar keys %{$p{sv_catpvf_mg}}, 2); ok($p{sv_catpvf_mg}{explicit}); ok($p{sv_catpvf_mg}{depend}); +ok(exists $p{PL_signals}); +ok(ref $p{PL_signals}, 'HASH'); +ok(scalar keys %{$p{PL_signals}}, 1); +ok($p{PL_signals}{explicit}); + =============================================================================== # check --list-unsupported option @@ -775,3 +783,26 @@ PL_signals = 123; if (PL_signals == 42) foo(); +=============================================================================== + +my $o = ppport(qw(--nochanges file.xs)); +ok($o =~ /^Uses PL_copline/m); +ok($o =~ /WARNING: PL_copline/m); +ok($o =~ /^Uses SvUOK/m); +ok($o =~ /WARNING: Uses SvUOK, which may not be portable/m); +ok($o =~ /^Analysis completed \(2 warnings\)/m); +ok($o =~ /^Looks good/m); + +$o = ppport(qw(--nochanges --compat-version=5.8.0 file.xs)); +ok($o =~ /^Uses PL_copline/m); +ok($o =~ /WARNING: PL_copline/m); +ok($o !~ /WARNING: Uses SvUOK, which may not be portable/m); +ok($o =~ /^Analysis completed \(1 warning\)/m); +ok($o =~ /^Looks good/m); + +---------------------------- file.xs ----------------------------------------- + +#include "ppport.h" +SvUOK +PL_copline + diff --git a/ext/Devel/PPPort/parts/inc/pvs b/ext/Devel/PPPort/parts/inc/pvs index e87d24a6ed..85ab27b5cd 100644 --- a/ext/Devel/PPPort/parts/inc/pvs +++ b/ext/Devel/PPPort/parts/inc/pvs @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 4 $ +## $Revision: 5 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:29 +0100 $ +## $Date: 2007/07/18 14:19:44 +0200 $ ## ################################################################################ ## @@ -69,7 +69,7 @@ hv_stores(hv, sv) SV *hv SV *sv PPCODE: - hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc(sv)); + hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc_simple(sv)); =tests plan => 7 diff --git a/ext/Devel/PPPort/parts/inc/sv_xpvf b/ext/Devel/PPPort/parts/inc/sv_xpvf index ffee9482d0..7a4d58808e 100644 --- a/ext/Devel/PPPort/parts/inc/sv_xpvf +++ b/ext/Devel/PPPort/parts/inc/sv_xpvf @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 5 $ +## $Revision: 7 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:32 +0100 $ +## $Date: 2007/08/12 23:57:10 +0200 $ ## ################################################################################ ## @@ -45,17 +45,14 @@ vnewSVpvf(pTHX_ const char *pat, va_list *args) #endif #endif -/* sv_vcatpvf depends on sv_vcatpvfn */ #if { VERSION >= 5.004 } && !defined(sv_vcatpvf) # define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif -/* sv_vsetpvf depends on sv_vsetpvfn */ #if { VERSION >= 5.004 } && !defined(sv_vsetpvf) # define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif -/* sv_catpvf_mg depends on sv_vcatpvfn, sv_catpvf_mg_nocontext */ #if { VERSION >= 5.004 } && !defined(sv_catpvf_mg) #if { NEED sv_catpvf_mg } @@ -72,7 +69,6 @@ sv_catpvf_mg(pTHX_ SV *sv, const char *pat, ...) #endif #endif -/* sv_catpvf_mg_nocontext depends on sv_vcatpvfn */ #ifdef PERL_IMPLICIT_CONTEXT #if { VERSION >= 5.004 } && !defined(sv_catpvf_mg_nocontext) #if { NEED sv_catpvf_mg_nocontext } @@ -92,6 +88,7 @@ sv_catpvf_mg_nocontext(SV *sv, const char *pat, ...) #endif #endif +/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */ #ifndef sv_catpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext @@ -100,7 +97,6 @@ sv_catpvf_mg_nocontext(SV *sv, const char *pat, ...) # endif #endif -/* sv_vcatpvf_mg depends on sv_vcatpvfn */ #if { VERSION >= 5.004 } && !defined(sv_vcatpvf_mg) # define sv_vcatpvf_mg(sv, pat, args) \ STMT_START { \ @@ -109,7 +105,6 @@ sv_catpvf_mg_nocontext(SV *sv, const char *pat, ...) } STMT_END #endif -/* sv_setpvf_mg depends on sv_vsetpvfn, sv_setpvf_mg_nocontext */ #if { VERSION >= 5.004 } && !defined(sv_setpvf_mg) #if { NEED sv_setpvf_mg } @@ -126,7 +121,6 @@ sv_setpvf_mg(pTHX_ SV *sv, const char *pat, ...) #endif #endif -/* sv_setpvf_mg_nocontext depends on sv_vsetpvfn */ #ifdef PERL_IMPLICIT_CONTEXT #if { VERSION >= 5.004 } && !defined(sv_setpvf_mg_nocontext) #if { NEED sv_setpvf_mg_nocontext } @@ -146,6 +140,7 @@ sv_setpvf_mg_nocontext(SV *sv, const char *pat, ...) #endif #endif +/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */ #ifndef sv_setpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext @@ -154,7 +149,6 @@ sv_setpvf_mg_nocontext(SV *sv, const char *pat, ...) # endif #endif -/* sv_vsetpvf_mg depends on sv_vsetpvfn */ #if { VERSION >= 5.004 } && !defined(sv_vsetpvf_mg) # define sv_vsetpvf_mg(sv, pat, args) \ STMT_START { \ diff --git a/ext/Devel/PPPort/parts/inc/uv b/ext/Devel/PPPort/parts/inc/uv index d11c40aca8..5e85503383 100644 --- a/ext/Devel/PPPort/parts/inc/uv +++ b/ext/Devel/PPPort/parts/inc/uv @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 13 $ +## $Revision: 15 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:33 +0100 $ +## $Date: 2007/08/12 15:53:17 +0200 $ ## ################################################################################ ## @@ -18,6 +18,7 @@ =provides __UNDEFINED__ +SvUOK =implementation @@ -43,6 +44,10 @@ __UNDEFINED__ SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv)) */ __UNDEFINED__ sv_uv(sv) SvUVx(sv) +#if !defined(SvUOK) && defined(SvIOK_UV) +# define SvUOK(sv) SvIOK_UV(sv) +#endif + __UNDEFINED__ XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) __UNDEFINED__ XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END diff --git a/ext/Devel/PPPort/parts/inc/variables b/ext/Devel/PPPort/parts/inc/variables index be1625b591..d34b9c5630 100644 --- a/ext/Devel/PPPort/parts/inc/variables +++ b/ext/Devel/PPPort/parts/inc/variables @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 8 $ +## $Revision: 11 $ ## $Author: mhx $ -## $Date: 2007/03/23 16:24:34 +0100 $ +## $Date: 2007/08/13 00:31:48 +0200 $ ## ################################################################################ ## @@ -17,7 +17,43 @@ =provides -/PL_\w+/ +PL_ppaddr +PL_no_modify +PL_DBsignal +PL_DBsingle +PL_DBsub +PL_DBtrace +PL_Sv +PL_compiling +PL_copline +PL_curcop +PL_curstash +PL_debstash +PL_defgv +PL_diehook +PL_dirty +PL_dowarn +PL_errgv +PL_expect +PL_hexdigit +PL_hints +PL_laststatval +PL_na +PL_perl_destruct_level +PL_perldb +PL_rsfp_filters +PL_rsfp +PL_stack_base +PL_stack_sp +PL_statcache +PL_stdingv +PL_sv_arenaroot +PL_sv_no +PL_sv_undef +PL_sv_yes +PL_tainted +PL_tainting +PL_signals PERL_SIGNALS_UNSAFE_FLAG =dontwarn @@ -93,12 +129,18 @@ __NEED_VAR__ U32 PL_signals = D_PPP_PERL_SIGNALS_INIT; /* Replace: 0 */ #endif +/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters + * Do not use this variable. It is internal to the perl parser + * and may change or even be removed in the future. Note that + * as of perl 5.9.5 you cannot assign to this variable anymore. + */ + +/* TODO: cannot assign to these vars; is it worth fixing? */ #if { VERSION >= 5.9.5 } -# define PL_PARSER_EXISTS -# define PL_expect (PL_parser ? PL_parser->expect : 0) -# define PL_copline (PL_parser ? PL_parser->copline : 0) -# define PL_rsfp (PL_parser ? PL_parser->rsfp : 0) -# define PL_rsfp_filters (PL_parser ? PL_parser->rsfp_filters : 0) +# define PL_expect (PL_parser ? PL_parser->expect : 0) +# define PL_copline (PL_parser ? PL_parser->copline : 0) +# define PL_rsfp (PL_parser ? PL_parser->rsfp : (PerlIO *) 0) +# define PL_rsfp_filters (PL_parser ? PL_parser->rsfp_filters : (AV *) 0) #endif =xsinit @@ -175,6 +217,27 @@ PL_copline() RETVAL SV * +PL_expect() + CODE: + RETVAL = newSViv((IV) PL_expect); + OUTPUT: + RETVAL + +SV * +PL_rsfp() + CODE: + RETVAL = newSViv(PL_rsfp != 0); + OUTPUT: + RETVAL + +SV * +PL_rsfp_filters() + CODE: + RETVAL = newSViv(PL_rsfp_filters != 0); + OUTPUT: + RETVAL + +SV * PL_hexdigit() CODE: RETVAL = newSVpv(PL_hexdigit, 0); @@ -219,22 +282,10 @@ other_variables() ppp_TESTVAR(PL_dirty); ppp_TESTVAR(PL_dowarn); ppp_TESTVAR(PL_errgv); -#ifdef PL_PARSER_EXISTS - ppp_TESTVAR(PL_parser); /* just any var that isn't PL_expect */ -#else - ppp_TESTVAR(PL_expect); -#endif ppp_TESTVAR(PL_laststatval); ppp_TESTVAR(PL_no_modify); ppp_TESTVAR(PL_perl_destruct_level); ppp_TESTVAR(PL_perldb); -#ifdef PL_PARSER_EXISTS - ppp_TESTVAR(PL_parser); /* just any var that isn't PL_expect */ - ppp_TESTVAR(PL_parser); -#else - ppp_TESTVAR(PL_rsfp); - ppp_TESTVAR(PL_rsfp_filters); -#endif ppp_TESTVAR(PL_stack_base); ppp_TESTVAR(PL_stack_sp); ppp_TESTVAR(PL_statcache); @@ -254,6 +305,9 @@ ok(!&Devel::PPPort::PL_sv_no()); ok(&Devel::PPPort::PL_na("abcd"), 4); ok(&Devel::PPPort::PL_Sv(), "mhx"); ok(defined &Devel::PPPort::PL_copline()); +ok(defined &Devel::PPPort::PL_expect()); +ok(defined &Devel::PPPort::PL_rsfp()); +ok(defined &Devel::PPPort::PL_rsfp_filters()); ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/); ok(defined &Devel::PPPort::PL_hints()); ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX"); diff --git a/ext/Devel/PPPort/parts/inc/warn b/ext/Devel/PPPort/parts/inc/warn index 8f000d41d9..eda8f2cc18 100644 --- a/ext/Devel/PPPort/parts/inc/warn +++ b/ext/Devel/PPPort/parts/inc/warn @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 3 $ +## $Revision: 5 $ ## $Author: mhx $ -## $Date: 2007/01/02 12:32:29 +0100 $ +## $Date: 2007/08/12 23:57:10 +0200 $ ## ################################################################################ ## @@ -83,7 +83,6 @@ __UNDEFINED__ packWARN(a) (a) # endif #endif -/* warner depends on vnewSVpvf */ #if { VERSION >= 5.004 } && !defined(warner) #if { NEED warner } @@ -104,7 +103,6 @@ warner(U32 err, const char *pat, ...) #define warner Perl_warner -/* Perl_warner_nocontext depends on warner */ #define Perl_warner_nocontext Perl_warner #endif diff --git a/ext/Devel/PPPort/parts/ppport.fnc b/ext/Devel/PPPort/parts/ppport.fnc new file mode 100644 index 0000000000..0a8495aaff --- /dev/null +++ b/ext/Devel/PPPort/parts/ppport.fnc @@ -0,0 +1,29 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: +: Perl/Pollution/Portability +: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: +: $Revision: 1 $ +: $Author: mhx $ +: $Date: 2007/08/12 15:02:00 +0200 $ +: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: +: Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz. +: Version 2.x, Copyright (C) 2001, Paul Marquess. +: Version 1.x, Copyright (C) 1999, Kenneth Albanowski. +: +: This program is free software; you can redistribute it and/or +: modify it under the same terms as Perl itself. +: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +: +: This file lists all API functions/macros that are provided purely +: by Devel::PPPort. It is in the same format as the F<embed.fnc> that +: ships with the Perl source code. +: + +Am |void |sv_magic_portable|NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \ + |I32 namlen diff --git a/ext/Devel/PPPort/parts/ppptools.pl b/ext/Devel/PPPort/parts/ppptools.pl index 64a4cf8fe3..6bd9a07e61 100644 --- a/ext/Devel/PPPort/parts/ppptools.pl +++ b/ext/Devel/PPPort/parts/ppptools.pl @@ -107,7 +107,7 @@ sub parse_partspec } unless (exists $data{provides}) { - $data{provides} = ($file =~ /(\w+)\.?$/)[0]; + $data{provides} = ($file =~ /(\w+)$/)[0]; } $data{provides} = [$data{provides} =~ /(\S+)/g]; diff --git a/ext/Devel/PPPort/parts/todo/5004000 b/ext/Devel/PPPort/parts/todo/5004000 index 4d33a77912..1382ea7648 100644 --- a/ext/Devel/PPPort/parts/todo/5004000 +++ b/ext/Devel/PPPort/parts/todo/5004000 @@ -51,6 +51,7 @@ sv_catpvf_mg # U sv_cmp_locale # U sv_derived_from # U sv_gets # E (Perl_sv_gets) +sv_magic_portable # U sv_setpvf # U sv_setpvf_mg # U sv_taint # U diff --git a/ext/Devel/PPPort/parts/todo/5006000 b/ext/Devel/PPPort/parts/todo/5006000 index e16d27b05a..146fb5fbbc 100644 --- a/ext/Devel/PPPort/parts/todo/5006000 +++ b/ext/Devel/PPPort/parts/todo/5006000 @@ -11,6 +11,7 @@ SvPVutf8_force # U SvPVutf8_nolen # U SvPVutf8x # U SvPVutf8x_force # U +SvUOK # U SvUTF8 # U SvUTF8_off # U SvUTF8_on # U @@ -91,7 +92,6 @@ my_atof # U my_fflush_all # U newANONATTRSUB # U newATTRSUB # U -newPADOP # U newXS # E (Perl_newXS) newXSproto # E new_collate # U (perl_new_collate) @@ -101,7 +101,6 @@ op_dump # U perl_parse # E (perl_parse) pmop_dump # U pv_display # U -re_intuit_start # U re_intuit_string # U reginitcolors # U require_pv # U (perl_require_pv) diff --git a/ext/Devel/PPPort/parts/todo/5007001 b/ext/Devel/PPPort/parts/todo/5007001 index d9dc66f473..d630ba6e8b 100644 --- a/ext/Devel/PPPort/parts/todo/5007001 +++ b/ext/Devel/PPPort/parts/todo/5007001 @@ -1,6 +1,5 @@ 5.007001 POPpbytex # E -SvUOK # U bytes_from_utf8 # U despatch_signals # U do_openn # U diff --git a/ext/Devel/PPPort/parts/todo/5007002 b/ext/Devel/PPPort/parts/todo/5007002 index f4f4b8d1a9..2fba735a96 100644 --- a/ext/Devel/PPPort/parts/todo/5007002 +++ b/ext/Devel/PPPort/parts/todo/5007002 @@ -9,10 +9,8 @@ my_atof2 # U my_strftime # U op_null # U realloc # U -sv_2pv_flags # U sv_catpvn_flags # U sv_catsv_flags # U -sv_pvn_force_flags # U sv_setsv_flags # U sv_utf8_upgrade_flags # U swash_fetch # E (Perl_swash_fetch) diff --git a/ext/Devel/PPPort/parts/todo/5008001 b/ext/Devel/PPPort/parts/todo/5008001 index b0a018c45d..ddc9d09c43 100644 --- a/ext/Devel/PPPort/parts/todo/5008001 +++ b/ext/Devel/PPPort/parts/todo/5008001 @@ -1,11 +1,11 @@ 5.008001 SvVOK # U doing_taint # U +find_runcv # U is_utf8_string_loc # U packlist # U save_bool # U savestack_grow_cnt # U -scan_vstring # U seed # U sv_cat_decode # U sv_compile_2op # E (Perl_sv_compile_2op) diff --git a/ext/Devel/PPPort/parts/todo/5009000 b/ext/Devel/PPPort/parts/todo/5009000 index 3b2ffc3101..28bc85958e 100644 --- a/ext/Devel/PPPort/parts/todo/5009000 +++ b/ext/Devel/PPPort/parts/todo/5009000 @@ -1,7 +1,6 @@ 5.009000 new_version # U save_set_svflags # U -upg_version # U vcmp # U vnumify # U vstringify # U diff --git a/ext/Devel/PPPort/parts/todo/5009005 b/ext/Devel/PPPort/parts/todo/5009005 index 5f1a0a2a34..f124d26132 100644 --- a/ext/Devel/PPPort/parts/todo/5009005 +++ b/ext/Devel/PPPort/parts/todo/5009005 @@ -2,6 +2,39 @@ MULTICALL # E POP_MULTICALL # E PUSH_MULTICALL # E +Perl_signbit # U +SvRX # U +SvRXOK # U +av_create_and_push # U +av_create_and_unshift_one # U +get_cvn_flags # U +gv_fetchfile_flags # U hv_assert # U +mro_get_linear_isa # U +mro_get_linear_isa_c3 # U +mro_get_linear_isa_dfs # U +mro_method_changed_in # U +my_dirfd # U +newSV_type # U pad_sv # U +pregcomp # E (Perl_pregcomp) +ptr_table_clear # U +ptr_table_fetch # U +ptr_table_free # U +ptr_table_new # U +ptr_table_split # U +ptr_table_store # U +re_compile # U +re_intuit_start # E (Perl_re_intuit_start) +reg_named_buff_all # U +reg_named_buff_exists # U +reg_named_buff_fetch # U +reg_named_buff_firstkey # U +reg_named_buff_nextkey # U +reg_named_buff_scalar # U +reg_stringify # U +regfree_internal # U +savesharedpvn # U +scan_vstring # E (Perl_scan_vstring) stashpv_hvname_match # U +upg_version # E (Perl_upg_version) diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak index 26b7299801..937e486a57 100644 --- a/ext/Devel/PPPort/soak +++ b/ext/Devel/PPPort/soak @@ -7,9 +7,9 @@ # ################################################################################ # -# $Revision: 15 $ +# $Revision: 16 $ # $Author: mhx $ -# $Date: 2007/01/02 12:32:28 +0100 $ +# $Date: 2007/08/12 23:25:33 +0200 $ # ################################################################################ # @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.11_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my %OPT = ( @@ -207,7 +207,7 @@ sub perl_version { my $perl = shift; my $ver = `$perl -e 'print \$]' 2>&1`; - return $? == 0 && $ver >= 5 ? $ver : 0; + return $? == 0 && $ver =~ /^\d+\.\d+/ && $ver >= 5 ? $ver : 0; } sub parse_version diff --git a/ext/Devel/PPPort/t/SvPV.t b/ext/Devel/PPPort/t/SvPV.t index 55eaa9933a..2484c5bb4e 100644 --- a/ext/Devel/PPPort/t/SvPV.t +++ b/ext/Devel/PPPort/t/SvPV.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (2) { + if (20) { load(); - plan(tests => 2); + plan(tests => 20); } } @@ -48,6 +48,32 @@ bootstrap Devel::PPPort; package main; -ok(&Devel::PPPort::SvPVbyte("mhx"), 3); -ok(&Devel::PPPort::SvPV_nolen("mhx"), 42); +my $mhx = "mhx"; + +ok(&Devel::PPPort::SvPVbyte($mhx), 3); + +my $i = 42; + +ok(&Devel::PPPort::SvPV_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_mutable($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++); + +ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++); +ok(&Devel::PPPort::SvPV_force($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++); + +ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++); +ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++); + +ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++); +ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++); diff --git a/ext/Devel/PPPort/t/magic.t b/ext/Devel/PPPort/t/magic.t index 37ccfccbe7..c782da4911 100644 --- a/ext/Devel/PPPort/t/magic.t +++ b/ext/Devel/PPPort/t/magic.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (13) { + if (15) { load(); - plan(tests => 13); + plan(tests => 15); } } @@ -89,3 +89,7 @@ ok($[ < 5.009 || $@ eq ''); ok($@ || Devel::PPPort::SvVSTRING_mg($ver)); ok(!Devel::PPPort::SvVSTRING_mg(4711)); +my $foo = 'bar'; +ok(Devel::PPPort::sv_magic_portable($foo)); +ok($foo eq 'bar'); + diff --git a/ext/Devel/PPPort/t/ppphtest.t b/ext/Devel/PPPort/t/ppphtest.t index c70c6847a2..e0af34fb17 100644 --- a/ext/Devel/PPPort/t/ppphtest.t +++ b/ext/Devel/PPPort/t/ppphtest.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (203) { + if (221) { load(); - plan(tests => 203); + plan(tests => 221); } } @@ -50,7 +50,7 @@ package main; BEGIN { if ($ENV{'SKIP_SLOW_TESTS'}) { - for (1 .. 203) { + for (1 .. 221) { skip("skip: SKIP_SLOW_TESTS", 0); } exit 0; @@ -301,9 +301,9 @@ ok($o =~ /^Scanning.*file1\.xs/mi); ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o =~ /^Uses newCONSTSUB/m); -ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m); +ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m); +ok($o =~ /WARNING: PL_expect/m); ok($o =~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --nohints file1.xs)); @@ -311,9 +311,9 @@ ok($o =~ /^Scanning.*file1\.xs/mi); ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o =~ /^Uses newCONSTSUB/m); -ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m); +ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m); +ok($o =~ /WARNING: PL_expect/m); ok($o !~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --nohints --nodiag file1.xs)); @@ -322,8 +322,8 @@ ok($o =~ /Analyzing.*file1\.xs/mi); ok($o !~ /^Scanning.*file2\.xs/mi); ok($o !~ /^Uses newCONSTSUB/m); ok($o !~ /^Uses SvPV_nolen/m); +ok($o =~ /WARNING: PL_expect/m); ok($o !~ /hint for newCONSTSUB/m); -ok($o !~ /hint for sv_2pv_nolen/m); ok($o =~ /^Looks good/m); $o = ppport(qw(--nochanges --quiet file1.xs)); @@ -362,11 +362,12 @@ ok($o =~ /^\s*$/); ---------------------------- file1.xs ----------------------------------------- #define NEED_newCONSTSUB -#define NEED_sv_2pv_nolen +#define NEED_sv_2pv_flags #include "ppport.h" newCONSTSUB(); SvPV_nolen(); +PL_expect = 0; ---------------------------- file2.xs ----------------------------------------- @@ -704,12 +705,14 @@ ok(not ref $p{call_sv}); ok(exists $p{grok_bin}); ok(ref $p{grok_bin}, 'HASH'); -ok(scalar keys %{$p{grok_bin}}, 1); +ok(scalar keys %{$p{grok_bin}}, 2); ok($p{grok_bin}{explicit}); +ok($p{grok_bin}{depend}); ok(exists $p{gv_stashpvn}); ok(ref $p{gv_stashpvn}, 'HASH'); -ok(scalar keys %{$p{gv_stashpvn}}, 1); +ok(scalar keys %{$p{gv_stashpvn}}, 2); +ok($p{gv_stashpvn}{depend}); ok($p{gv_stashpvn}{hint}); ok(exists $p{sv_catpvf_mg}); @@ -718,6 +721,11 @@ ok(scalar keys %{$p{sv_catpvf_mg}}, 2); ok($p{sv_catpvf_mg}{explicit}); ok($p{sv_catpvf_mg}{depend}); +ok(exists $p{PL_signals}); +ok(ref $p{PL_signals}, 'HASH'); +ok(scalar keys %{$p{PL_signals}}, 1); +ok($p{PL_signals}{explicit}); + =============================================================================== # check --list-unsupported option @@ -806,3 +814,26 @@ PL_signals = 123; if (PL_signals == 42) foo(); +=============================================================================== + +my $o = ppport(qw(--nochanges file.xs)); +ok($o =~ /^Uses PL_copline/m); +ok($o =~ /WARNING: PL_copline/m); +ok($o =~ /^Uses SvUOK/m); +ok($o =~ /WARNING: Uses SvUOK, which may not be portable/m); +ok($o =~ /^Analysis completed \(2 warnings\)/m); +ok($o =~ /^Looks good/m); + +$o = ppport(qw(--nochanges --compat-version=5.8.0 file.xs)); +ok($o =~ /^Uses PL_copline/m); +ok($o =~ /WARNING: PL_copline/m); +ok($o !~ /WARNING: Uses SvUOK, which may not be portable/m); +ok($o =~ /^Analysis completed \(1 warning\)/m); +ok($o =~ /^Looks good/m); + +---------------------------- file.xs ----------------------------------------- + +#include "ppport.h" +SvUOK +PL_copline + diff --git a/ext/Devel/PPPort/t/variables.t b/ext/Devel/PPPort/t/variables.t index b616c5bc93..83444a7061 100644 --- a/ext/Devel/PPPort/t/variables.t +++ b/ext/Devel/PPPort/t/variables.t @@ -56,6 +56,9 @@ ok(!&Devel::PPPort::PL_sv_no()); ok(&Devel::PPPort::PL_na("abcd"), 4); ok(&Devel::PPPort::PL_Sv(), "mhx"); ok(defined &Devel::PPPort::PL_copline()); +ok(defined &Devel::PPPort::PL_expect()); +ok(defined &Devel::PPPort::PL_rsfp()); +ok(defined &Devel::PPPort::PL_rsfp_filters()); ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/); ok(defined &Devel::PPPort::PL_hints()); ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX"); |