ext/Devel/PPPort/parts/inc/variables Devel::PPPort include
ext/Devel/PPPort/parts/inc/version Devel::PPPort include
ext/Devel/PPPort/parts/inc/warn Devel::PPPort include
+ext/Devel/PPPort/parts/ppport.fnc Devel::PPPort API listing
ext/Devel/PPPort/parts/ppptools.pl Devel::PPPort various utilities
ext/Devel/PPPort/parts/todo/5004000 Devel::PPPort todo file
ext/Devel/PPPort/parts/todo/5004010 Devel::PPPort todo file
+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
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.
#
################################################################################
#
-# $Revision: 52 $
+# $Revision: 54 $
# $Author: mhx $
-# $Date: 2007/03/23 16:27:19 +0100 $
+# $Date: 2007/08/13 00:03:11 +0200 $
#
################################################################################
#
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);
{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;
#
################################################################################
#
-# $Revision: 52 $
+# $Revision: 54 $
# $Author: mhx $
-# $Date: 2007/03/23 16:27:19 +0100 $
+# $Date: 2007/08/13 00:03:11 +0200 $
#
################################################################################
#
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
{
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:
>
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
#
################################################################################
#
-# $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.
#
# 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>',
},
{
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);
force
test
install!
- test-archives+
+ test-archives=i
)) or pod2usage(2);
if (exists $opt{config}) {
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 $@;
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 @@
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";
=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.
#
################################################################################
#
-# $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.
#
#
################################################################################
#
-# $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.
#
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
#
################################################################################
#
-# $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.
#
#
################################################################################
#
-# $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.
#
#
################################################################################
#
-# $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.
#
=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.
#
################################################################################
#
-# $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.
#
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 : () }
#
################################################################################
#
-# $Revision: 22 $
+# $Revision: 25 $
# $Author: mhx $
-# $Date: 2007/01/02 12:32:28 +0100 $
+# $Date: 2007/08/12 23:23:40 +0200 $
#
################################################################################
#
*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};
#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
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
Am|NV|SvNVX|SV* sv
Amn|(whatever)|RETVAL
Amn|(whatever)|THIS
+Am|REGEXP *|SvRX|SV *sv
Ams||dAX
Ams||dAXMARK
Ams||dITEMS
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
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
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
my_fflush_all # E
newANONATTRSUB # E
newATTRSUB # E
-newPADOP # E
newSVnv # E (Perl_newSVnv)
newSVpvf # E (Perl_newSVpvf)
newSVuv # 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)
uvuni_to_utf8 # U
PTR2ul # added by devel/scanprov
UVXf # added by devel/scanprov
+SV_IMMEDIATE_UNREF # 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
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
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)
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
5.009000
new_version # U
save_set_svflags # U
-upg_version # U
vcmp # U
vnumify # U
vstringify # U
-WARN_ASSERTIONS # added by devel/scanprov
savesvpv # U
vnormal # U
MY_CXT_CLONE # added by devel/scanprov
+UTF8_MAXBYTES # added by devel/scanprov
+SV_NOSTEAL # 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
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
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
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
#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
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
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
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
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
#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
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
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
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
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
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 \
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
#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|...
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
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
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|...
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
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
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
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
#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)
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
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
|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
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
#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 \
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
#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
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
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 \
#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
#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
|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)
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
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
#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)
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
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
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
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
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
/*
################################################################################
##
-## $Revision: 14 $
+## $Revision: 15 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:33 +0100 $
+## $Date: 2007/08/12 23:57:47 +0200 $
##
################################################################################
##
=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
#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))
#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().
*/
__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
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;
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++);
################################################################################
##
-## $Revision: 12 $
+## $Revision: 14 $
## $Author: mhx $
-## $Date: 2007/03/23 17:57:58 +0100 $
+## $Date: 2007/08/12 23:57:09 +0200 $
##
################################################################################
##
/* Replace: 0 */
/* Replace perl_eval_pv with eval_pv */
-/* eval_pv depends on eval_sv */
#ifndef eval_pv
#if { NEED eval_pv }
#endif
#endif
-/* load_module depends on vload_module */
-
#ifndef load_module
#if { NEED load_module }
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
################################################################################
##
-## $Revision: 11 $
+## $Revision: 13 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:34 +0100 $
+## $Date: 2007/08/12 23:57:10 +0200 $
##
################################################################################
##
__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
#endif
#endif
-/* grok_number depends on grok_numeric_radix */
-
#ifndef grok_number
#if { NEED grok_number }
int
################################################################################
##
-## $Revision: 11 $
+## $Revision: 13 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:34 +0100 $
+## $Date: 2007/08/12 23:24:34 +0200 $
##
################################################################################
##
__UNDEFINED__
/sv_\w+_mg/
+sv_magic_portable
=implementation
__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
__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
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;
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');
+
################################################################################
##
-## $Revision: 38 $
+## $Revision: 39 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:34 +0100 $
+## $Date: 2007/07/18 13:09:15 +0200 $
##
################################################################################
##
EXTERN_C
STMT_START
STMT_END
+UTF8_MAXBYTES
XSRETURN
=implementation
__UNDEFINED__ SVf "_"
+__UNDEFINED__ UTF8_MAXBYTES UTF8_MAXLEN
+
=xsmisc
XS(XS_Devel__PPPort_dXSTARG); /* prototype */
################################################################################
##
-## $Revision: 35 $
+## $Revision: 40 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:33 +0100 $
+## $Date: 2007/08/12 23:58:21 +0200 $
##
################################################################################
##
# 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+)};
$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;
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) {
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";
}
}
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;
}
}
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) {
$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);
my %file = %{$files{$filename}};
my $func;
my $c = $file{code};
+ my $warnings = 0;
for $func (sort keys %{$file{uses_Perl}}) {
if ($API{$func}{varargs}) {
$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}}) {
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}";
}
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
################################################################################
##
-## $Revision: 28 $
+## $Revision: 30 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:32 +0100 $
+## $Date: 2007/05/22 21:26:46 +0200 $
##
################################################################################
##
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
=head2 --nohints
Don't output any hints. Hints often contain useful portability
-notes.
+notes. Warnings will still be displayed.
=head2 --nochanges
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
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:
################################################################################
##
-## $Revision: 34 $
+## $Revision: 38 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:32 +0100 $
+## $Date: 2007/08/12 23:58:29 +0200 $
##
################################################################################
##
##
################################################################################
-=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;
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));
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));
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));
---------------------------- 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 -----------------------------------------
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});
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
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
+
################################################################################
##
-## $Revision: 4 $
+## $Revision: 5 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:29 +0100 $
+## $Date: 2007/07/18 14:19:44 +0200 $
##
################################################################################
##
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
################################################################################
##
-## $Revision: 5 $
+## $Revision: 7 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:32 +0100 $
+## $Date: 2007/08/12 23:57:10 +0200 $
##
################################################################################
##
#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 }
#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 }
#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
# 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 { \
} 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 }
#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 }
#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
# 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 { \
################################################################################
##
-## $Revision: 13 $
+## $Revision: 15 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:33 +0100 $
+## $Date: 2007/08/12 15:53:17 +0200 $
##
################################################################################
##
=provides
__UNDEFINED__
+SvUOK
=implementation
*/
__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
################################################################################
##
-## $Revision: 8 $
+## $Revision: 11 $
## $Author: mhx $
-## $Date: 2007/03/23 16:24:34 +0100 $
+## $Date: 2007/08/13 00:31:48 +0200 $
##
################################################################################
##
=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
/* 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
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);
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);
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");
################################################################################
##
-## $Revision: 3 $
+## $Revision: 5 $
## $Author: mhx $
-## $Date: 2007/01/02 12:32:29 +0100 $
+## $Date: 2007/08/12 23:57:10 +0200 $
##
################################################################################
##
# endif
#endif
-/* warner depends on vnewSVpvf */
#if { VERSION >= 5.004 } && !defined(warner)
#if { NEED warner }
#define warner Perl_warner
-/* Perl_warner_nocontext depends on warner */
#define Perl_warner_nocontext Perl_warner
#endif
--- /dev/null
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:
+: 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
}
unless (exists $data{provides}) {
- $data{provides} = ($file =~ /(\w+)\.?$/)[0];
+ $data{provides} = ($file =~ /(\w+)$/)[0];
}
$data{provides} = [$data{provides} =~ /(\S+)/g];
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
SvPVutf8_nolen # U
SvPVutf8x # U
SvPVutf8x_force # U
+SvUOK # U
SvUTF8 # U
SvUTF8_off # U
SvUTF8_on # U
my_fflush_all # U
newANONATTRSUB # U
newATTRSUB # U
-newPADOP # U
newXS # E (Perl_newXS)
newXSproto # E
new_collate # U (perl_new_collate)
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)
5.007001
POPpbytex # E
-SvUOK # U
bytes_from_utf8 # U
despatch_signals # U
do_openn # 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)
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)
5.009000
new_version # U
save_set_svflags # U
-upg_version # U
vcmp # U
vnumify # U
vstringify # U
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)
#
################################################################################
#
-# $Revision: 15 $
+# $Revision: 16 $
# $Author: mhx $
-# $Date: 2007/01/02 12:32:28 +0100 $
+# $Date: 2007/08/12 23:25:33 +0200 $
#
################################################################################
#
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 = (
{
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
require 'testutil.pl' if $@;
}
- if (2) {
+ if (20) {
load();
- plan(tests => 2);
+ plan(tests => 20);
}
}
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++);
require 'testutil.pl' if $@;
}
- if (13) {
+ if (15) {
load();
- plan(tests => 13);
+ plan(tests => 15);
}
}
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');
+
require 'testutil.pl' if $@;
}
- if (203) {
+ if (221) {
load();
- plan(tests => 203);
+ plan(tests => 221);
}
}
BEGIN {
if ($ENV{'SKIP_SLOW_TESTS'}) {
- for (1 .. 203) {
+ for (1 .. 221) {
skip("skip: SKIP_SLOW_TESTS", 0);
}
exit 0;
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));
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));
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));
---------------------------- 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 -----------------------------------------
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});
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
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
+
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");