4 #include "patchlevel.h"
8 -/* Version 5.005_5x (Development version for 5.006) doesn't like sv_...
9 - anymore, but 5.004 doesn't know about PL_sv..
10 - Don't want to push up required version just for this. */
13 -#define PL_sv_undef sv_undef
14 -#define PL_sv_no sv_no
15 -#define PL_sv_yes sv_yes
29 +----------------------------------------------------------------------
31 + ppport.h -- Perl/Pollution/Portability Version 3.21
33 + Automatically created by Devel::PPPort running under perl 5.020002.
35 + Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
36 + includes in parts/inc/ instead.
38 + Use 'perldoc ppport.h' to view the documentation below.
40 +----------------------------------------------------------------------
48 +ppport.h - Perl/Pollution/Portability version 3.21
52 + perl ppport.h [options] [source files]
54 + Searches current directory for files if no [source files] are given
56 + --help show short help
58 + --version show version
60 + --patch=file write one patch file with changes
61 + --copy=suffix write changed copies with suffix
62 + --diff=program use diff program and options
64 + --compat-version=version provide compatibility with Perl version
65 + --cplusplus accept C++ comments
67 + --quiet don't output anything except fatal errors
68 + --nodiag don't show diagnostics
69 + --nohints don't show hints
70 + --nochanges don't suggest changes
71 + --nofilter don't filter input files
73 + --strip strip all script and doc functionality from
76 + --list-provided list provided API
77 + --list-unsupported list unsupported API
78 + --api-info=name show Perl API portability information
82 +This version of F<ppport.h> is designed to support operation with Perl
83 +installations back to 5.003, and has been tested up to 5.11.5.
89 +Display a brief usage summary.
93 +Display the version of F<ppport.h>.
95 +=head2 --patch=I<file>
97 +If this option is given, a single patch file will be created if
98 +any changes are suggested. This requires a working diff program
99 +to be installed on your system.
101 +=head2 --copy=I<suffix>
103 +If this option is given, a copy of each file will be saved with
104 +the given suffix that contains the suggested changes. This does
105 +not require any external programs. Note that this does not
106 +automagially add a dot between the original filename and the
107 +suffix. If you want the dot, you have to include it in the option
110 +If neither C<--patch> or C<--copy> are given, the default is to
111 +simply print the diffs for each file. This requires either
112 +C<Text::Diff> or a C<diff> program to be installed.
114 +=head2 --diff=I<program>
116 +Manually set the diff program and options to use. The default
117 +is to use C<Text::Diff>, when installed, and output unified
120 +=head2 --compat-version=I<version>
122 +Tell F<ppport.h> to check for compatibility with the given
123 +Perl version. The default is to check for compatibility with Perl
124 +version 5.003. You can use this option to reduce the output
125 +of F<ppport.h> if you intend to be backward compatible only
126 +down to a certain Perl version.
130 +Usually, F<ppport.h> will detect C++ style comments and
131 +replace them with C style comments for portability reasons.
132 +Using this option instructs F<ppport.h> to leave C++
137 +Be quiet. Don't print anything except fatal errors.
141 +Don't output any diagnostic messages. Only portability
142 +alerts will be printed.
146 +Don't output any hints. Hints often contain useful portability
147 +notes. Warnings will still be displayed.
151 +Don't suggest any changes. Only give diagnostic output and hints
152 +unless these are also deactivated.
156 +Don't filter the list of input files. By default, files not looking
157 +like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
161 +Strip all script and documentation functionality from F<ppport.h>.
162 +This reduces the size of F<ppport.h> dramatically and may be useful
163 +if you want to include F<ppport.h> in smaller modules without
164 +increasing their distribution size too much.
166 +The stripped F<ppport.h> will have a C<--unstrip> option that allows
167 +you to undo the stripping, but only if an appropriate C<Devel::PPPort>
168 +module is installed.
170 +=head2 --list-provided
172 +Lists the API elements for which compatibility is provided by
173 +F<ppport.h>. Also lists if it must be explicitly requested,
174 +if it has dependencies, and if there are hints or warnings for it.
176 +=head2 --list-unsupported
178 +Lists the API elements that are known not to be supported by
179 +F<ppport.h> and below which version of Perl they probably
180 +won't be available or work.
182 +=head2 --api-info=I<name>
184 +Show portability information for API elements matching I<name>.
185 +If I<name> is surrounded by slashes, it is interpreted as a regular
190 +In order for a Perl extension (XS) module to be as portable as possible
191 +across differing versions of Perl itself, certain steps need to be taken.
197 +Including this header is the first major one. This alone will give you
198 +access to a large part of the Perl API that hasn't been available in
199 +earlier Perl releases. Use
201 + perl ppport.h --list-provided
203 +to see which API elements are provided by ppport.h.
207 +You should avoid using deprecated parts of the API. For example, using
208 +global Perl variables without the C<PL_> prefix is deprecated. Also,
209 +some API functions used to have a C<perl_> prefix. Using this form is
210 +also deprecated. You can safely use the supported API, as F<ppport.h>
211 +will provide wrappers for older Perl versions.
215 +If you use one of a few functions or variables that were not present in
216 +earlier versions of Perl, and that can't be provided using a macro, you
217 +have to explicitly request support for these functions by adding one or
218 +more C<#define>s in your source code before the inclusion of F<ppport.h>.
220 +These functions or variables will be marked C<explicit> in the list shown
221 +by C<--list-provided>.
223 +Depending on whether you module has a single or multiple files that
224 +use such functions or variables, you want either C<static> or global
227 +For a C<static> function or variable (used only in a single source
230 + #define NEED_function
231 + #define NEED_variable
233 +For a global function or variable (used in multiple source files),
236 + #define NEED_function_GLOBAL
237 + #define NEED_variable_GLOBAL
239 +Note that you mustn't have more than one global request for the
240 +same function or variable in your project.
242 + Function / Variable Static Request Global Request
243 + -----------------------------------------------------------------------------------------
244 + PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL
245 + PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL
246 + eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL
247 + grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL
248 + grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL
249 + grok_number() NEED_grok_number NEED_grok_number_GLOBAL
250 + grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL
251 + grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL
252 + load_module() NEED_load_module NEED_load_module_GLOBAL
253 + my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL
254 + my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL
255 + my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL
256 + my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL
257 + newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
258 + newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
259 + newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL
260 + newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL
261 + newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL
262 + pv_display() NEED_pv_display NEED_pv_display_GLOBAL
263 + pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL
264 + pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL
265 + sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL
266 + sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
267 + sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
268 + sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
269 + sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL
270 + sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL
271 + sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL
272 + vload_module() NEED_vload_module NEED_vload_module_GLOBAL
273 + vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL
274 + warner() NEED_warner NEED_warner_GLOBAL
276 +To avoid namespace conflicts, you can change the namespace of the
277 +explicitly exported functions / variables using the C<DPPP_NAMESPACE>
278 +macro. Just C<#define> the macro before including C<ppport.h>:
280 + #define DPPP_NAMESPACE MyOwnNamespace_
281 + #include "ppport.h"
283 +The default namespace is C<DPPP_>.
287 +The good thing is that most of the above can be checked by running
288 +F<ppport.h> on your source code. See the next section for
293 +To verify whether F<ppport.h> is needed for your module, whether you
294 +should make any changes to your code, and whether any special defines
295 +should be used, F<ppport.h> can be run as a Perl script to check your
296 +source code. Simply say:
300 +The result will usually be a list of patches suggesting changes
301 +that should at least be acceptable, if not necessarily the most
302 +efficient solution, or a fix for all possible problems.
304 +If you know that your XS module uses features only available in
305 +newer Perl releases, if you're aware that it uses C++ comments,
306 +and if you want all suggestions as a single patch file, you could
307 +use something like this:
309 + perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
311 +If you only want your code to be scanned without any suggestions
314 + perl ppport.h --nochanges
316 +You can specify a different C<diff> program or options, using
317 +the C<--diff> option:
319 + perl ppport.h --diff='diff -C 10'
321 +This would output context diffs with 10 lines of context.
323 +If you want to create patched copies of your files instead, use:
325 + perl ppport.h --copy=.new
327 +To display portability information for the C<newSVpvn> function,
330 + perl ppport.h --api-info=newSVpvn
332 +Since the argument to C<--api-info> can be a regular expression,
335 + perl ppport.h --api-info=/_nomg$/
337 +to display portability information for all C<_nomg> functions or
339 + perl ppport.h --api-info=/./
341 +to display information for all known API elements.
345 +If this version of F<ppport.h> is causing failure during
346 +the compilation of this module, please check if newer versions
347 +of either this module or C<Devel::PPPort> are available on CPAN
348 +before sending a bug report.
350 +If F<ppport.h> was generated using the latest version of
351 +C<Devel::PPPort> and is causing failure of this module, please
352 +file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
354 +Please include the following information:
360 +The complete output from running "perl -V"
368 +The name and version of the module you were trying to build.
372 +A full log of the build that failed.
376 +Any other information that you think could be relevant.
380 +For the latest version of this code, please get the C<Devel::PPPort>
385 +Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
387 +Version 2.x, Copyright (C) 2001, Paul Marquess.
389 +Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
391 +This program is free software; you can redistribute it and/or
392 +modify it under the same terms as Perl itself.
396 +See L<Devel::PPPort>.
402 +# Disable broken TRIE-optimization
403 +BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
418 +my($ppport) = $0 =~ /([\w.]+)$/;
419 +my $LF = '(?:\r\n|[\r\n])'; # line feed
420 +my $HS = "[ \t]"; # horizontal whitespace
422 +# Never use C comments in this file!
425 +my $rccs = quotemeta $ccs;
426 +my $rcce = quotemeta $cce;
429 + require Getopt::Long;
430 + Getopt::Long::GetOptions(\%opt, qw(
431 + help quiet diag! filter! hints! changes! cplusplus strip version
432 + patch=s copy=s diff=s compat-version=s
433 + list-provided list-unsupported api-info=s
437 +if ($@ and grep /^-/, @ARGV) {
438 + usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
439 + die "Getopt::Long not found. Please don't use any options.\n";
442 +if ($opt{version}) {
443 + print "This is $0 $VERSION.\n";
447 +usage() if $opt{help};
448 +strip() if $opt{strip};
450 +if (exists $opt{'compat-version'}) {
451 + my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
453 + die "Invalid version number format: '$opt{'compat-version'}'\n";
455 + die "Only Perl 5 is supported\n" if $r != 5;
456 + die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
457 + $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
460 + $opt{'compat-version'} = 5;
463 +my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
465 + ($2 ? ( base => $2 ) : ()),
466 + ($3 ? ( todo => $3 ) : ()),
467 + (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
468 + (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
469 + (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
471 + : die "invalid spec: $_" } qw(
474 +BhkDISABLE||5.019003|
475 +BhkENABLE||5.019003|
476 +BhkENTRY_set||5.019003|
481 +CPERLscope|5.005000||p
484 +CopFILEAV|5.006000||p
485 +CopFILEGV_set|5.006000||p
486 +CopFILEGV|5.006000||p
487 +CopFILESV|5.006000||p
488 +CopFILE_set|5.006000||p
490 +CopSTASHPV_set|5.006000||p
491 +CopSTASHPV|5.006000||p
492 +CopSTASH_eq|5.006000||p
493 +CopSTASH_set|5.006000||p
494 +CopSTASH|5.006000||p
495 +CopyD|5.009002|5.004050|p
497 +CvPADLIST||5.008001|
500 +DEFSV_set|5.010001||p
502 +END_EXTERN_C|5.005000||p
506 +EXTERN_C|5.005000||p
511 +GROK_NUMERIC_RADIX|5.007002||p
515 +G_METHOD|5.006001||p
525 +Gv_AMupdate||5.011000|
526 +HEf_SVKEY||5.004000|
531 +HeSVKEY_force||5.004000|
532 +HeSVKEY_set||5.004000|
536 +HvENAMELEN||5.015004|
537 +HvENAMEUTF8||5.015004|
539 +HvNAMELEN_get|5.009003||p
540 +HvNAMELEN||5.015004|
541 +HvNAMEUTF8||5.015004|
542 +HvNAME_get|5.009003||p
545 +IN_LOCALE_COMPILETIME|5.007002||p
546 +IN_LOCALE_RUNTIME|5.007002||p
547 +IN_LOCALE|5.007002||p
548 +IN_PERL_COMPILETIME|5.008001||p
549 +IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
550 +IS_NUMBER_INFINITY|5.007002||p
551 +IS_NUMBER_IN_UV|5.007002||p
552 +IS_NUMBER_NAN|5.007003||p
553 +IS_NUMBER_NEG|5.007002||p
554 +IS_NUMBER_NOT_INT|5.007002||p
562 +MULTICALL||5.019003|
563 +MY_CXT_CLONE|5.009002||p
564 +MY_CXT_INIT|5.007003||p
566 +MoveD|5.009002|5.004050|p
588 +PAD_COMPNAME_FLAGS|||
589 +PAD_COMPNAME_GEN_set|||
591 +PAD_COMPNAME_OURSTASH|||
593 +PAD_COMPNAME_TYPE|||
594 +PAD_RESTORE_LOCAL|||
596 +PAD_SAVE_SETNULLPAD|||
598 +PAD_SET_CUR_NOSAVE|||
602 +PERLIO_FUNCS_CAST|5.009003||p
603 +PERLIO_FUNCS_DECL|5.009003||p
604 +PERL_ABS|5.008001||p
605 +PERL_BCDVERSION|5.019002||p
606 +PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
607 +PERL_HASH|5.004000||p
608 +PERL_INT_MAX|5.004000||p
609 +PERL_INT_MIN|5.004000||p
610 +PERL_LONG_MAX|5.004000||p
611 +PERL_LONG_MIN|5.004000||p
612 +PERL_MAGIC_arylen|5.007002||p
613 +PERL_MAGIC_backref|5.007002||p
614 +PERL_MAGIC_bm|5.007002||p
615 +PERL_MAGIC_collxfrm|5.007002||p
616 +PERL_MAGIC_dbfile|5.007002||p
617 +PERL_MAGIC_dbline|5.007002||p
618 +PERL_MAGIC_defelem|5.007002||p
619 +PERL_MAGIC_envelem|5.007002||p
620 +PERL_MAGIC_env|5.007002||p
621 +PERL_MAGIC_ext|5.007002||p
622 +PERL_MAGIC_fm|5.007002||p
623 +PERL_MAGIC_glob|5.019002||p
624 +PERL_MAGIC_isaelem|5.007002||p
625 +PERL_MAGIC_isa|5.007002||p
626 +PERL_MAGIC_mutex|5.019002||p
627 +PERL_MAGIC_nkeys|5.007002||p
628 +PERL_MAGIC_overload_elem|5.019002||p
629 +PERL_MAGIC_overload_table|5.007002||p
630 +PERL_MAGIC_overload|5.019002||p
631 +PERL_MAGIC_pos|5.007002||p
632 +PERL_MAGIC_qr|5.007002||p
633 +PERL_MAGIC_regdata|5.007002||p
634 +PERL_MAGIC_regdatum|5.007002||p
635 +PERL_MAGIC_regex_global|5.007002||p
636 +PERL_MAGIC_shared_scalar|5.007003||p
637 +PERL_MAGIC_shared|5.007003||p
638 +PERL_MAGIC_sigelem|5.007002||p
639 +PERL_MAGIC_sig|5.007002||p
640 +PERL_MAGIC_substr|5.007002||p
641 +PERL_MAGIC_sv|5.007002||p
642 +PERL_MAGIC_taint|5.007002||p
643 +PERL_MAGIC_tiedelem|5.007002||p
644 +PERL_MAGIC_tiedscalar|5.007002||p
645 +PERL_MAGIC_tied|5.007002||p
646 +PERL_MAGIC_utf8|5.008001||p
647 +PERL_MAGIC_uvar_elem|5.007003||p
648 +PERL_MAGIC_uvar|5.007002||p
649 +PERL_MAGIC_vec|5.007002||p
650 +PERL_MAGIC_vstring|5.008001||p
651 +PERL_PV_ESCAPE_ALL|5.009004||p
652 +PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p
653 +PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p
654 +PERL_PV_ESCAPE_NOCLEAR|5.009004||p
655 +PERL_PV_ESCAPE_QUOTE|5.009004||p
656 +PERL_PV_ESCAPE_RE|5.009005||p
657 +PERL_PV_ESCAPE_UNI_DETECT|5.009004||p
658 +PERL_PV_ESCAPE_UNI|5.009004||p
659 +PERL_PV_PRETTY_DUMP|5.009004||p
660 +PERL_PV_PRETTY_ELLIPSES|5.010000||p
661 +PERL_PV_PRETTY_LTGT|5.009004||p
662 +PERL_PV_PRETTY_NOCLEAR|5.010000||p
663 +PERL_PV_PRETTY_QUOTE|5.009004||p
664 +PERL_PV_PRETTY_REGPROP|5.009004||p
665 +PERL_QUAD_MAX|5.004000||p
666 +PERL_QUAD_MIN|5.004000||p
667 +PERL_REVISION|5.006000||p
668 +PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
669 +PERL_SCAN_DISALLOW_PREFIX|5.007003||p
670 +PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
671 +PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
672 +PERL_SHORT_MAX|5.004000||p
673 +PERL_SHORT_MIN|5.004000||p
674 +PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
675 +PERL_SUBVERSION|5.006000||p
676 +PERL_SYS_INIT3||5.010000|
677 +PERL_SYS_INIT||5.010000|
678 +PERL_SYS_TERM||5.019003|
679 +PERL_UCHAR_MAX|5.004000||p
680 +PERL_UCHAR_MIN|5.004000||p
681 +PERL_UINT_MAX|5.004000||p
682 +PERL_UINT_MIN|5.004000||p
683 +PERL_ULONG_MAX|5.004000||p
684 +PERL_ULONG_MIN|5.004000||p
685 +PERL_UNUSED_ARG|5.009003||p
686 +PERL_UNUSED_CONTEXT|5.009004||p
687 +PERL_UNUSED_DECL|5.007002||p
688 +PERL_UNUSED_VAR|5.007002||p
689 +PERL_UQUAD_MAX|5.004000||p
690 +PERL_UQUAD_MIN|5.004000||p
691 +PERL_USE_GCC_BRACE_GROUPS|5.009004||p
692 +PERL_USHORT_MAX|5.004000||p
693 +PERL_USHORT_MIN|5.004000||p
694 +PERL_VERSION|5.006000||p
695 +PL_DBsignal|5.005000||p
700 +PL_bufend|5.019002||p
701 +PL_bufptr|5.019002||p
703 +PL_compiling|5.004050||p
704 +PL_comppad_name||5.017004|
705 +PL_comppad||5.008001|
706 +PL_copline|5.019002||p
707 +PL_curcop|5.004050||p
708 +PL_curpad||5.005000|
709 +PL_curstash|5.004050||p
710 +PL_debstash|5.004050||p
711 +PL_defgv|5.004050||p
712 +PL_diehook|5.004050||p
713 +PL_dirty|5.004050||p
715 +PL_errgv|5.004050||p
716 +PL_error_count|5.019002||p
717 +PL_expect|5.019002||p
718 +PL_hexdigit|5.005000||p
719 +PL_hints|5.005000||p
720 +PL_in_my_stash|5.019002||p
721 +PL_in_my|5.019002||p
722 +PL_keyword_plugin||5.011002|
724 +PL_laststatval|5.005000||p
725 +PL_lex_state|5.019002||p
726 +PL_lex_stuff|5.019002||p
727 +PL_linestr|5.019002||p
728 +PL_modglobal||5.005000|n
730 +PL_no_modify|5.006000||p
732 +PL_opfreehook||5.011000|n
733 +PL_parser|5.009005|5.009005|p
734 +PL_peepp||5.007003|n
735 +PL_perl_destruct_level|5.004050||p
736 +PL_perldb|5.004050||p
737 +PL_ppaddr|5.006000||p
738 +PL_rpeepp||5.013005|n
739 +PL_rsfp_filters|5.019002||p
742 +PL_signals|5.008001||p
743 +PL_stack_base|5.004050||p
744 +PL_stack_sp|5.004050||p
745 +PL_statcache|5.005000||p
746 +PL_stdingv|5.004050||p
747 +PL_sv_arenaroot|5.004050||p
748 +PL_sv_no|5.004050||pn
749 +PL_sv_undef|5.004050||pn
750 +PL_sv_yes|5.004050||pn
751 +PL_tainted|5.004050||p
752 +PL_tainting|5.004050||p
753 +PL_tokenbuf|5.019002||p
754 +POP_MULTICALL||5.019003|
758 +POPpbytex||5.007001|n
769 +PUSH_MULTICALL||5.019003|
771 +PUSHmortal|5.009002||p
779 +PadlistARRAY||5.019003|
780 +PadlistMAX||5.019003|
781 +PadlistNAMESARRAY||5.019003|
782 +PadlistNAMESMAX||5.019003|
783 +PadlistNAMES||5.019003|
784 +PadlistREFCNT||5.017004|
787 +PadnameLEN||5.019003|
790 +PadnamePV||5.019003|
791 +PadnameSV||5.019003|
793 +PadnameUTF8||5.019003|
794 +PadnamelistARRAY||5.019003|
795 +PadnamelistMAX||5.019003|
796 +PerlIO_clearerr||5.007003|
797 +PerlIO_close||5.007003|
798 +PerlIO_context_layers||5.009004|
799 +PerlIO_eof||5.007003|
800 +PerlIO_error||5.007003|
801 +PerlIO_fileno||5.007003|
802 +PerlIO_fill||5.007003|
803 +PerlIO_flush||5.007003|
804 +PerlIO_get_base||5.007003|
805 +PerlIO_get_bufsiz||5.007003|
806 +PerlIO_get_cnt||5.007003|
807 +PerlIO_get_ptr||5.007003|
808 +PerlIO_read||5.007003|
809 +PerlIO_seek||5.007003|
810 +PerlIO_set_cnt||5.007003|
811 +PerlIO_set_ptrcnt||5.007003|
812 +PerlIO_setlinebuf||5.007003|
813 +PerlIO_stderr||5.007003|
814 +PerlIO_stdin||5.007003|
815 +PerlIO_stdout||5.007003|
816 +PerlIO_tell||5.007003|
817 +PerlIO_unread||5.007003|
818 +PerlIO_write||5.007003|
819 +Perl_signbit||5.009005|n
820 +PoisonFree|5.009004||p
821 +PoisonNew|5.009004||p
822 +PoisonWith|5.009004||p
824 +READ_XDIGIT||5.017006|
832 +SAVE_DEFSV|5.004050||p
835 +START_EXTERN_C|5.005000||p
836 +START_MY_CXT|5.007003||p
839 +STR_WITH_LEN|5.009003||p
841 +SV_CONST_RETURN|5.009003||p
842 +SV_COW_DROP_PV|5.008001||p
843 +SV_COW_SHARED_HASH_KEYS|5.009005||p
844 +SV_GMAGIC|5.007002||p
845 +SV_HAS_TRAILING_NUL|5.009004||p
846 +SV_IMMEDIATE_UNREF|5.007001||p
847 +SV_MUTABLE_RETURN|5.009003||p
848 +SV_NOSTEAL|5.009002||p
849 +SV_SMAGIC|5.009003||p
850 +SV_UTF8_NO_ENCODING|5.008001||p
852 +SVf_UTF8|5.006000||p
854 +SVt_INVLIST||5.019002|
869 +SVt_REGEXP||5.011000|
879 +SvGAMAGIC||5.006001|
880 +SvGETMAGIC|5.004050||p
883 +SvIOK_notUV||5.006000|
885 +SvIOK_only_UV||5.006000|
891 +SvIV_nomg|5.009001||p
895 +SvIsCOW_shared_hash||5.008003|
900 +SvMAGIC_set|5.009003||p
910 +SvNV_nomg||5.013002|
915 +SvOOK_offset||5.011000|
918 +SvPOK_only_UTF8||5.006000|
923 +SvPVX_const|5.009003||p
924 +SvPVX_mutable|5.009003||p
926 +SvPV_const|5.009003||p
927 +SvPV_flags_const_nolen|5.009003||p
928 +SvPV_flags_const|5.009003||p
929 +SvPV_flags_mutable|5.009003||p
930 +SvPV_flags|5.007002||p
931 +SvPV_force_flags_mutable|5.009003||p
932 +SvPV_force_flags_nolen|5.009003||p
933 +SvPV_force_flags|5.007002||p
934 +SvPV_force_mutable|5.009003||p
935 +SvPV_force_nolen|5.009003||p
936 +SvPV_force_nomg_nolen|5.009003||p
937 +SvPV_force_nomg|5.007002||p
939 +SvPV_mutable|5.009003||p
940 +SvPV_nolen_const|5.009003||p
941 +SvPV_nolen|5.006000||p
942 +SvPV_nomg_const_nolen|5.009003||p
943 +SvPV_nomg_const|5.009003||p
944 +SvPV_nomg_nolen|5.013007||p
945 +SvPV_nomg|5.007002||p
946 +SvPV_renew|5.009003||p
948 +SvPVbyte_force||5.009002|
949 +SvPVbyte_nolen||5.006000|
950 +SvPVbytex_force||5.006000|
951 +SvPVbytex||5.006000|
952 +SvPVbyte|5.006000||p
953 +SvPVutf8_force||5.006000|
954 +SvPVutf8_nolen||5.006000|
955 +SvPVutf8x_force||5.006000|
956 +SvPVutf8x||5.006000|
960 +SvREFCNT_dec_NN||5.017007|
962 +SvREFCNT_inc_NN|5.009004||p
963 +SvREFCNT_inc_simple_NN|5.009004||p
964 +SvREFCNT_inc_simple_void_NN|5.009004||p
965 +SvREFCNT_inc_simple_void|5.009004||p
966 +SvREFCNT_inc_simple|5.009004||p
967 +SvREFCNT_inc_void_NN|5.009004||p
968 +SvREFCNT_inc_void|5.009004||p
974 +SvRV_set|5.009003||p
979 +SvSHARED_HASH|5.009003||p
981 +SvSTASH_set|5.009003||p
983 +SvSetMagicSV_nosteal||5.004000|
984 +SvSetMagicSV||5.004000|
985 +SvSetSV_nosteal||5.004000|
987 +SvTAINTED_off||5.004000|
988 +SvTAINTED_on||5.004000|
989 +SvTAINTED||5.004000|
992 +SvTRUE_nomg||5.013006|
996 +SvUOK|5.007001|5.006000|p
998 +SvUTF8_off||5.006000|
999 +SvUTF8_on||5.006000|
1003 +SvUV_nomg|5.009001||p
1004 +SvUV_set|5.009003||p
1008 +SvVSTRING_mg|5.009004||p
1010 +UNDERBAR|5.009002||p
1011 +UTF8_MAXBYTES|5.009002||p
1018 +WARN_ALL|5.006000||p
1019 +WARN_AMBIGUOUS|5.006000||p
1020 +WARN_ASSERTIONS|5.019002||p
1021 +WARN_BAREWORD|5.006000||p
1022 +WARN_CLOSED|5.006000||p
1023 +WARN_CLOSURE|5.006000||p
1024 +WARN_DEBUGGING|5.006000||p
1025 +WARN_DEPRECATED|5.006000||p
1026 +WARN_DIGIT|5.006000||p
1027 +WARN_EXEC|5.006000||p
1028 +WARN_EXITING|5.006000||p
1029 +WARN_GLOB|5.006000||p
1030 +WARN_INPLACE|5.006000||p
1031 +WARN_INTERNAL|5.006000||p
1032 +WARN_IO|5.006000||p
1033 +WARN_LAYER|5.008000||p
1034 +WARN_MALLOC|5.006000||p
1035 +WARN_MISC|5.006000||p
1036 +WARN_NEWLINE|5.006000||p
1037 +WARN_NUMERIC|5.006000||p
1038 +WARN_ONCE|5.006000||p
1039 +WARN_OVERFLOW|5.006000||p
1040 +WARN_PACK|5.006000||p
1041 +WARN_PARENTHESIS|5.006000||p
1042 +WARN_PIPE|5.006000||p
1043 +WARN_PORTABLE|5.006000||p
1044 +WARN_PRECEDENCE|5.006000||p
1045 +WARN_PRINTF|5.006000||p
1046 +WARN_PROTOTYPE|5.006000||p
1047 +WARN_QW|5.006000||p
1048 +WARN_RECURSION|5.006000||p
1049 +WARN_REDEFINE|5.006000||p
1050 +WARN_REGEXP|5.006000||p
1051 +WARN_RESERVED|5.006000||p
1052 +WARN_SEMICOLON|5.006000||p
1053 +WARN_SEVERE|5.006000||p
1054 +WARN_SIGNAL|5.006000||p
1055 +WARN_SUBSTR|5.006000||p
1056 +WARN_SYNTAX|5.006000||p
1057 +WARN_TAINT|5.006000||p
1058 +WARN_THREADS|5.008000||p
1059 +WARN_UNINITIALIZED|5.006000||p
1060 +WARN_UNOPENED|5.006000||p
1061 +WARN_UNPACK|5.006000||p
1062 +WARN_UNTIE|5.006000||p
1063 +WARN_UTF8|5.006000||p
1064 +WARN_VOID|5.006000||p
1065 +WIDEST_UTYPE|5.015004||p
1066 +XCPT_CATCH|5.009002||p
1067 +XCPT_RETHROW|5.009002|5.007001|p
1068 +XCPT_TRY_END|5.009002|5.004000|p
1069 +XCPT_TRY_START|5.009002|5.004000|p
1071 +XPUSHmortal|5.009002||p
1076 +XSPROTO|5.010000||p
1083 +XSRETURN_UV|5.008001||p
1091 +XST_mUV|5.008001||p
1093 +XS_APIVERSION_BOOTCHECK||5.013004|
1094 +XS_EXTERNAL||5.019003|
1095 +XS_INTERNAL||5.019003|
1096 +XS_VERSION_BOOTCHECK|||
1098 +XSprePUSH|5.006000||p
1100 +XopDISABLE||5.019003|
1101 +XopENABLE||5.019003|
1102 +XopENTRY_set||5.019003|
1103 +XopENTRY||5.019003|
1104 +XopFLAGS||5.013007|
1107 +_aMY_CXT|5.007003||p
1108 +_add_range_to_invlist|||
1109 +_append_range_to_invlist|||
1110 +_core_swash_init|||
1111 +_get_swash_invlist|||
1112 +_invlist_array_init|||
1113 +_invlist_contains_cp|||
1114 +_invlist_contents|||
1116 +_invlist_intersection_maybe_complement_2nd|||
1117 +_invlist_intersection|||
1118 +_invlist_invert_prop|||
1121 +_invlist_populate_swatch|||
1123 +_invlist_subtract|||
1124 +_invlist_union_maybe_complement_2nd|||
1126 +_is_uni_FOO||5.017008|
1127 +_is_uni_perl_idcont||5.017008|
1128 +_is_uni_perl_idstart||5.017007|
1129 +_is_utf8_FOO||5.017008|
1130 +_is_utf8_mark||5.017008|
1131 +_is_utf8_perl_idcont||5.017008|
1132 +_is_utf8_perl_idstart||5.017007|
1133 +_new_invlist_C_array|||
1135 +_pMY_CXT|5.007003||p
1136 +_swash_inversion_hash|||
1137 +_swash_to_invlist|||
1139 +_to_uni_fold_flags||5.013011|
1140 +_to_upper_title_latin1|||
1141 +_to_utf8_fold_flags||5.015006|
1142 +_to_utf8_lower_flags||5.015006|
1143 +_to_utf8_title_flags||5.015006|
1144 +_to_utf8_upper_flags||5.015006|
1145 +aMY_CXT_|5.007003||p
1146 +aMY_CXT|5.007003||p
1151 +aassign_common_vars|||
1152 +add_cp_to_invlist|||
1154 +add_utf16_textfilter|||
1156 +adjust_size_and_find_bucket|||n
1157 +adjust_stack_on_leave|||
1158 +alloc_maybe_populate_EXACT|||
1162 +amagic_cmp_locale|||
1164 +amagic_deref_call||5.013007|
1166 +amagic_is_enabled|||
1168 +anonymise_cv_maybe|||
1173 +apply_attrs_string||5.006001|
1176 +assert_uft8_cache_coherent|||
1177 +atfork_lock||5.007003|n
1178 +atfork_unlock||5.007003|n
1179 +av_arylen_p||5.009003|
1181 +av_create_and_push||5.009005|
1182 +av_create_and_unshift_one||5.009005|
1183 +av_delete||5.006000|
1184 +av_exists||5.006000|
1189 +av_iter_p||5.011000|
1197 +av_tindex||5.017009|
1198 +av_top_index||5.017009|
1206 +block_gimme||5.004000|
1208 +blockhook_register||5.013003|
1210 +boot_core_PerlIO|||
1211 +boot_core_UNIVERSAL|||
1213 +bytes_cmp_utf8||5.013007|
1214 +bytes_from_utf8||5.007001|
1216 +bytes_to_utf8||5.006001|
1217 +call_argv|5.006000||p
1218 +call_atexit||5.006000|
1219 +call_list||5.004000|
1220 +call_method|5.006000||p
1221 +call_pv|5.006000||p
1222 +call_sv|5.006000||p
1223 +caller_cx||5.013005|
1226 +cast_i32||5.006000|
1228 +cast_ulong||5.006000|
1230 +check_locale_boundary_crossing|||
1231 +check_type_and_open|||
1233 +check_utf8_print|||
1236 +ck_entersub_args_core|||
1237 +ck_entersub_args_list||5.013006|
1238 +ck_entersub_args_proto_or_list||5.013006|
1239 +ck_entersub_args_proto||5.013006|
1240 +ck_warner_d||5.011001|v
1241 +ck_warner||5.011001|v
1243 +ckwarn_d||5.009003|
1250 +clear_placeholders|||
1251 +clone_params_del|||n
1252 +clone_params_new|||n
1254 +compute_EXACTish|||
1256 +cop_fetch_label||5.015001|
1258 +cop_hints_2hv||5.013007|
1259 +cop_hints_fetch_pvn||5.013007|
1260 +cop_hints_fetch_pvs||5.013007|
1261 +cop_hints_fetch_pv||5.013007|
1262 +cop_hints_fetch_sv||5.013007|
1263 +cop_store_label||5.015001|
1264 +cophh_2hv||5.013007|
1265 +cophh_copy||5.013007|
1266 +cophh_delete_pvn||5.013007|
1267 +cophh_delete_pvs||5.013007|
1268 +cophh_delete_pv||5.013007|
1269 +cophh_delete_sv||5.013007|
1270 +cophh_fetch_pvn||5.013007|
1271 +cophh_fetch_pvs||5.013007|
1272 +cophh_fetch_pv||5.013007|
1273 +cophh_fetch_sv||5.013007|
1274 +cophh_free||5.013007|
1275 +cophh_new_empty||5.019003|
1276 +cophh_store_pvn||5.013007|
1277 +cophh_store_pvs||5.013007|
1278 +cophh_store_pv||5.013007|
1279 +cophh_store_sv||5.013007|
1281 +core_regclass_swash|||
1283 +could_it_be_a_POSIX_class|||
1285 +create_eval_scope|||
1286 +croak_memory_wrap||5.019003|n
1288 +croak_no_modify||5.013003|n
1289 +croak_nocontext|||vn
1291 +croak_sv||5.013001|
1292 +croak_xs_usage||5.010001|n
1294 +csighandler||5.009003|n
1296 +current_re_engine|||
1298 +custom_op_desc||5.007003|
1299 +custom_op_name||5.007003|
1300 +custom_op_register||5.013007|
1301 +custom_op_xop||5.013007|
1302 +cv_ckproto_len_flags|||
1305 +cv_const_sv_or_av|||
1306 +cv_const_sv||5.004000|
1309 +cv_get_call_checker||5.013006|
1310 +cv_set_call_checker||5.013006|
1317 +dAXMARK|5.009003||p
1321 +dMULTICALL||5.009003|
1322 +dMY_CXT_SV|5.007003||p
1323 +dMY_CXT|5.007003||p
1332 +dUNDERBAR|5.009002||p
1337 +dXSTARG|5.006000||p
1343 +debprofdump||5.005000|
1345 +debstackptrs||5.007003|
1346 +debstack||5.007003|
1347 +debug_start_match|||
1351 +delete_eval_scope|||
1352 +delimcpy||5.004000|n
1353 +deprecate_commaless_var_list|||
1354 +despatch_signals||5.007001|
1366 +do_binmode||5.004050|
1375 +do_gv_dump||5.006000|
1376 +do_gvgv_dump||5.006000|
1377 +do_hv_dump||5.006000|
1381 +do_magic_dump||5.006000|
1386 +do_op_dump||5.006000|
1388 +do_open9||5.006000|
1389 +do_openn||5.007001|
1391 +do_pmop_dump||5.006000|
1402 +do_sv_dump||5.006000|
1405 +do_trans_complex_utf8|||
1406 +do_trans_complex|||
1407 +do_trans_count_utf8|||
1409 +do_trans_simple_utf8|||
1420 +doing_taint||5.008001|n
1434 +dump_all||5.006000|
1435 +dump_eval||5.006000|
1438 +dump_form||5.006000|
1439 +dump_indent||5.006000|v
1441 +dump_packsubs_perl|||
1442 +dump_packsubs||5.006000|
1444 +dump_sub||5.006000|
1446 +dump_trie_interim_list|||
1447 +dump_trie_interim_table|||
1449 +dump_vindent||5.006000|
1453 +eval_pv|5.006000||p
1454 +eval_sv|5.006000||p
1457 +fbm_compile||5.005000|
1458 +fbm_instr||5.005000|
1459 +feature_is_enabled|||
1466 +find_and_forget_pmops|||
1467 +find_array_subscript|||
1470 +find_hash_subscript|||
1471 +find_in_my_stash|||
1473 +find_runcv_where|||
1474 +find_runcv||5.008001|
1476 +find_rundefsvoffset||5.009002|
1477 +find_rundefsv||5.013002|
1481 +foldEQ_latin1||5.013008|n
1482 +foldEQ_locale||5.013002|n
1483 +foldEQ_utf8_flags||5.013010|
1484 +foldEQ_utf8||5.013002|
1488 +force_ident_maybe_lex|||
1492 +force_strict_version|||
1496 +form_nocontext|||vn
1497 +form_short_octal_warning|||
1500 +fprintf_nocontext|||vn
1501 +free_global_struct|||
1502 +free_tied_hv_pool|||
1504 +gen_constant_list|||
1505 +get_and_check_backslash_N_name|||
1508 +get_context||5.006000|n
1509 +get_cvn_flags|5.009005||p
1510 +get_cvs|5.011000||p
1516 +get_invlist_iter_addr|||
1517 +get_invlist_offset_addr|||
1518 +get_invlist_previous_index_addr|||
1522 +get_op_descs||5.005000|
1523 +get_op_names||5.005000|
1525 +get_ppaddr||5.006000|
1528 +get_vtbl||5.005030|
1529 +getcwd_sv||5.007002|
1532 +glob_assign_glob|||
1537 +grok_bin|5.007003||p
1542 +grok_hex|5.007003||p
1543 +grok_number|5.007002||p
1544 +grok_numeric_radix|5.007002||p
1545 +grok_oct|5.007003||p
1551 +gv_add_by_type||5.011000|
1552 +gv_autoload4||5.004000|
1553 +gv_autoload_pvn||5.015004|
1554 +gv_autoload_pv||5.015004|
1555 +gv_autoload_sv||5.015004|
1557 +gv_const_sv||5.009003|
1559 +gv_efullname3||5.004000|
1560 +gv_efullname4||5.006001|
1563 +gv_fetchfile_flags||5.009005|
1565 +gv_fetchmeth_autoload||5.007003|
1566 +gv_fetchmeth_pv_autoload||5.015004|
1567 +gv_fetchmeth_pvn_autoload||5.015004|
1568 +gv_fetchmeth_pvn||5.015004|
1569 +gv_fetchmeth_pv||5.015004|
1570 +gv_fetchmeth_sv_autoload||5.015004|
1571 +gv_fetchmeth_sv||5.015004|
1572 +gv_fetchmethod_autoload||5.004000|
1573 +gv_fetchmethod_pv_flags||5.015004|
1574 +gv_fetchmethod_pvn_flags||5.015004|
1575 +gv_fetchmethod_sv_flags||5.015004|
1578 +gv_fetchpvn_flags|5.009002||p
1579 +gv_fetchpvs|5.009004||p
1581 +gv_fetchsv|5.009002||p
1582 +gv_fullname3||5.004000|
1583 +gv_fullname4||5.006001|
1585 +gv_handler||5.007001|
1586 +gv_init_pvn||5.015004|
1587 +gv_init_pv||5.015004|
1589 +gv_init_sv||5.015004|
1591 +gv_magicalize_isa|||
1592 +gv_name_set||5.009004|
1593 +gv_stashpvn|5.004000||p
1594 +gv_stashpvs|5.009003||p
1597 +gv_try_downgrade|||
1598 +handle_regex_sets|||
1601 +hfree_next_entry|||
1606 +hv_backreferences_p|||
1607 +hv_clear_placeholders||5.009001|
1609 +hv_common_key_len||5.010000|
1610 +hv_common||5.010000|
1611 +hv_copy_hints_hv||5.009004|
1612 +hv_delayfree_ent||5.004000|
1613 +hv_delete_common|||
1614 +hv_delete_ent||5.004000|
1616 +hv_eiter_p||5.009003|
1617 +hv_eiter_set||5.009003|
1620 +hv_exists_ent||5.004000|
1622 +hv_fetch_ent||5.004000|
1623 +hv_fetchs|5.009003||p
1627 +hv_free_ent||5.004000|
1629 +hv_iterkeysv||5.004000|
1631 +hv_iternext_flags||5.008000|
1635 +hv_kill_backrefs|||
1636 +hv_ksplit||5.004000|
1639 +hv_name_set||5.009003|
1641 +hv_placeholders_get||5.009003|
1642 +hv_placeholders_p|||
1643 +hv_placeholders_set||5.009003|
1644 +hv_rand_set||5.017011|
1645 +hv_riter_p||5.009003|
1646 +hv_riter_set||5.009003|
1647 +hv_scalar||5.009001|
1648 +hv_store_ent||5.004000|
1649 +hv_store_flags||5.008000|
1650 +hv_stores|5.009004||p
1654 +ibcmp_locale||5.004000|
1655 +ibcmp_utf8||5.007003|
1658 +incpush_if_exists|||
1662 +init_argv_symbols|||
1666 +init_global_struct|||
1667 +init_i18nl10n||5.006000|
1668 +init_i18nl14n||5.006000|
1673 +init_postdump_symbols|||
1674 +init_predump_symbols|||
1675 +init_stacks||5.005000|
1687 +invlist_is_iterating|||
1688 +invlist_iterfinish|||
1689 +invlist_iterinit|||
1690 +invlist_iternext|||
1692 +invlist_previous_index|||
1694 +invlist_set_previous_index|||
1696 +invoke_exception_hook|||
1698 +isALNUMC|5.006000||p
1700 +isALPHANUMERIC||5.017008|
1702 +isASCII|5.006000|5.006000|p
1703 +isBLANK|5.006001||p
1704 +isCNTRL|5.006000|5.006000|p
1708 +isGRAPH|5.006000||p
1709 +isGV_with_GP|5.009004||p
1710 +isIDCONT||5.017008|
1715 +isPRINT|5.004000||p
1716 +isPSXSPC|5.006001||p
1717 +isPUNCT|5.006000||p
1720 +isWORDCHAR||5.013006|
1721 +isXDIGIT|5.006000||p
1723 +is_ascii_string||5.011000|n
1724 +is_cur_LC_category_utf8|||
1725 +is_handle_constructor|||n
1726 +is_list_assignment|||
1727 +is_lvalue_sub||5.007001|
1728 +is_uni_alnum_lc||5.006000|
1729 +is_uni_alnumc_lc||5.017007|
1730 +is_uni_alnumc||5.017007|
1731 +is_uni_alnum||5.006000|
1732 +is_uni_alpha_lc||5.006000|
1733 +is_uni_alpha||5.006000|
1734 +is_uni_ascii_lc||5.006000|
1735 +is_uni_ascii||5.006000|
1736 +is_uni_blank_lc||5.017002|
1737 +is_uni_blank||5.017002|
1738 +is_uni_cntrl_lc||5.006000|
1739 +is_uni_cntrl||5.006000|
1740 +is_uni_digit_lc||5.006000|
1741 +is_uni_digit||5.006000|
1742 +is_uni_graph_lc||5.006000|
1743 +is_uni_graph||5.006000|
1744 +is_uni_idfirst_lc||5.006000|
1745 +is_uni_idfirst||5.006000|
1746 +is_uni_lower_lc||5.006000|
1747 +is_uni_lower||5.006000|
1748 +is_uni_print_lc||5.006000|
1749 +is_uni_print||5.006000|
1750 +is_uni_punct_lc||5.006000|
1751 +is_uni_punct||5.006000|
1752 +is_uni_space_lc||5.006000|
1753 +is_uni_space||5.006000|
1754 +is_uni_upper_lc||5.006000|
1755 +is_uni_upper||5.006000|
1756 +is_uni_xdigit_lc||5.006000|
1757 +is_uni_xdigit||5.006000|
1758 +is_utf8_alnumc||5.017007|
1759 +is_utf8_alnum||5.006000|
1760 +is_utf8_alpha||5.006000|
1761 +is_utf8_ascii||5.006000|
1762 +is_utf8_blank||5.017002|
1763 +is_utf8_char_buf||5.015008|n
1764 +is_utf8_char_slow|||n
1765 +is_utf8_char||5.006000|n
1766 +is_utf8_cntrl||5.006000|
1768 +is_utf8_digit||5.006000|
1769 +is_utf8_graph||5.006000|
1770 +is_utf8_idcont||5.008000|
1771 +is_utf8_idfirst||5.006000|
1772 +is_utf8_lower||5.006000|
1773 +is_utf8_mark||5.006000|
1774 +is_utf8_perl_space||5.011001|
1775 +is_utf8_perl_word||5.011001|
1776 +is_utf8_posix_digit||5.011001|
1777 +is_utf8_print||5.006000|
1778 +is_utf8_punct||5.006000|
1779 +is_utf8_space||5.006000|
1780 +is_utf8_string_loclen||5.009003|n
1781 +is_utf8_string_loc||5.008001|n
1782 +is_utf8_string||5.006001|n
1783 +is_utf8_upper||5.006000|
1784 +is_utf8_xdigit||5.006000|
1785 +is_utf8_xidcont||5.013010|
1786 +is_utf8_xidfirst||5.013010|
1792 +keyword_plugin_standard|||
1795 +lex_bufutf8||5.011002|
1796 +lex_discard_to||5.011002|
1797 +lex_grow_linestr||5.011002|
1798 +lex_next_chunk||5.011002|
1799 +lex_peek_unichar||5.011002|
1800 +lex_read_space||5.011002|
1801 +lex_read_to||5.011002|
1802 +lex_read_unichar||5.011002|
1803 +lex_start||5.009005|
1804 +lex_stuff_pvn||5.011002|
1805 +lex_stuff_pvs||5.013005|
1806 +lex_stuff_pv||5.013006|
1807 +lex_stuff_sv||5.011002|
1808 +lex_unstuff||5.011002|
1811 +load_module_nocontext|||vn
1812 +load_module|5.006000||pv
1815 +looks_like_number|||
1822 +mXPUSHi|5.009002||p
1823 +mXPUSHn|5.009002||p
1824 +mXPUSHp|5.009002||p
1825 +mXPUSHs|5.010001||p
1826 +mXPUSHu|5.009002||p
1830 +magic_clear_all_env|||
1831 +magic_cleararylen_p|||
1833 +magic_clearhints|||
1838 +magic_copycallchecker|||
1839 +magic_dump||5.006000|
1840 +magic_existspack|||
1841 +magic_freearylen_p|||
1844 +magic_getdefelem|||
1854 +magic_killbackrefs|||
1859 +magic_regdata_cnt|||
1860 +magic_regdatum_get|||
1861 +magic_regdatum_set|||
1862 +magic_scalarpack|||
1863 +magic_set_all_env|||
1865 +magic_setcollxfrm|||
1867 +magic_setdefelem|||
1886 +make_trie_failtable|||
1888 +malloc_good_size|||n
1892 +matcher_matches_sv|||
1902 +mess_nocontext|||vn
1911 +mg_findext||5.013008|
1913 +mg_free_type||5.013006|
1916 +mg_length||5.005000|
1921 +mini_mktime||5.007002|
1924 +mode_from_discipline|||
1929 +mro_clean_isarev|||
1930 +mro_gather_and_rename|||
1931 +mro_get_from_name||5.010001|
1932 +mro_get_linear_isa_dfs|||
1933 +mro_get_linear_isa||5.009005|
1934 +mro_get_private_data||5.010001|
1935 +mro_isa_changed_in|||
1938 +mro_method_changed_in||5.009005|
1939 +mro_package_moved|||
1940 +mro_register||5.010001|
1941 +mro_set_mro||5.010001|
1942 +mro_set_private_data||5.010001|
1945 +my_atof2||5.007002|
1954 +my_dirfd||5.009005|
1957 +my_failure_exit||5.004000|
1958 +my_fflush_all||5.006000|
1959 +my_fork||5.007003|n
1962 +my_lstat||5.019003|
1964 +my_memset||5.004000|n
1965 +my_pclose||5.004000|
1966 +my_popen_list||5.007001|
1967 +my_popen||5.004000|
1969 +my_snprintf|5.009004||pvn
1970 +my_socketpair||5.007003|n
1971 +my_sprintf|5.009003||pvn
1974 +my_strftime||5.007002|
1975 +my_strlcat|5.009004||pn
1976 +my_strlcpy|5.009004||pn
1978 +my_vsnprintf||5.009004|n
1980 +newANONATTRSUB||5.006000|
1985 +newATTRSUB_flags|||
1986 +newATTRSUB||5.006000|
1991 +newCONSTSUB_flags||5.015006|
1992 +newCONSTSUB|5.004050||p
1996 +newFOROP||5.013007|
1997 +newGIVENOP||5.009003|
2002 +newGVgen_flags||5.015004|
2014 +newMYSUB||5.017004|
2022 +newRV_inc|5.004000||p
2023 +newRV_noinc|5.004000||p
2031 +newSV_type|5.009005||p
2032 +newSVhek||5.009003|
2035 +newSVpadname||5.017004|
2036 +newSVpv_share||5.013006|
2037 +newSVpvf_nocontext|||vn
2038 +newSVpvf||5.004000|v
2039 +newSVpvn_flags|5.010001||p
2040 +newSVpvn_share|5.007001||p
2041 +newSVpvn_utf8|5.010001||p
2042 +newSVpvn|5.004050||p
2043 +newSVpvs_flags|5.010001||p
2044 +newSVpvs_share|5.009003||p
2045 +newSVpvs|5.009003||p
2049 +newSVuv|5.006000||p
2053 +newWHENOP||5.009003|
2054 +newWHILEOP||5.013007|
2055 +newXS_flags||5.009004|
2057 +newXSproto||5.006000|
2059 +new_collate||5.006000|
2061 +new_ctype||5.006000|
2064 +new_numeric||5.006000|
2065 +new_stackinfo||5.005000|
2066 +new_version||5.009000|
2067 +new_warnings_bitfield|||
2072 +no_bareword_allowed|||
2076 +not_incrementable|||
2077 +nothreadhook||5.008000|
2082 +op_append_elem||5.013006|
2083 +op_append_list||5.013006|
2086 +op_contextualize||5.013006|
2092 +op_linklist||5.013006|
2094 +op_lvalue||5.013007|
2096 +op_prepend_elem||5.013006|
2099 +op_refcnt_lock||5.009002|
2100 +op_refcnt_unlock||5.009002|
2101 +op_scope||5.013007|
2106 +opslab_force_free|||
2107 +opslab_free_nopad|||
2109 +pMY_CXT_|5.007003||p
2110 +pMY_CXT|5.007003||p
2113 +packWARN|5.007003||p
2114 +pack_cat||5.007003|
2118 +packlist||5.008001|
2119 +pad_add_anon||5.008001|
2120 +pad_add_name_pvn||5.015001|
2121 +pad_add_name_pvs||5.015001|
2122 +pad_add_name_pv||5.015001|
2123 +pad_add_name_sv||5.015001|
2128 +pad_compname_type||5.009003|
2130 +pad_findmy_pvn||5.015001|
2131 +pad_findmy_pvs||5.015001|
2132 +pad_findmy_pv||5.015001|
2133 +pad_findmy_sv||5.015001|
2134 +pad_fixup_inner_anons|||
2144 +pad_tidy||5.008001|
2147 +parse_arithexpr||5.013008|
2148 +parse_barestmt||5.013007|
2149 +parse_block||5.013007|
2151 +parse_fullexpr||5.013008|
2152 +parse_fullstmt||5.013005|
2154 +parse_label||5.013007|
2155 +parse_listexpr||5.013008|
2156 +parse_lparen_question_flags|||
2157 +parse_stmtseq||5.013006|
2158 +parse_termexpr||5.013008|
2159 +parse_unicode_opts|||
2161 +parser_free_nexttoke_ops|||
2163 +path_is_searchable|||n
2166 +perl_alloc_using|||n
2168 +perl_clone_using|||n
2171 +perl_destruct||5.007003|n
2173 +perl_parse||5.006000|n
2177 +pmop_dump||5.006000|
2183 +pregcomp||5.009005|
2185 +pregfree2||5.011000|
2187 +prepend_madprops|||
2188 +prescan_version||5.011004|
2190 +printf_nocontext|||vn
2191 +process_special_blocks|||
2193 +ptr_table_clear||5.009005|
2194 +ptr_table_fetch||5.009005|
2196 +ptr_table_free||5.009005|
2197 +ptr_table_new||5.009005|
2198 +ptr_table_split||5.009005|
2199 +ptr_table_store||5.009005|
2202 +put_latin1_charclass_innards|||
2203 +pv_display|5.006000||p
2204 +pv_escape|5.009004||p
2205 +pv_pretty|5.009004||p
2206 +pv_uni_display||5.007003|
2209 +re_compile||5.009005|
2212 +re_intuit_start||5.019001|
2213 +re_intuit_string||5.006000|
2215 +readpipe_override|||
2216 +realloc||5.007002|n
2217 +reentrant_free||5.019003|
2218 +reentrant_init||5.019003|
2219 +reentrant_retry||5.019003|vn
2220 +reentrant_size||5.019003|
2221 +ref_array_or_hash|||
2222 +refcounted_he_chain_2hv|||
2223 +refcounted_he_fetch_pvn|||
2224 +refcounted_he_fetch_pvs|||
2225 +refcounted_he_fetch_pv|||
2226 +refcounted_he_fetch_sv|||
2227 +refcounted_he_free|||
2228 +refcounted_he_inc|||
2229 +refcounted_he_new_pvn|||
2230 +refcounted_he_new_pvs|||
2231 +refcounted_he_new_pv|||
2232 +refcounted_he_new_sv|||
2233 +refcounted_he_value|||
2237 +reg_check_named_buff_matched|||
2238 +reg_named_buff_all||5.009005|
2239 +reg_named_buff_exists||5.009005|
2240 +reg_named_buff_fetch||5.009005|
2241 +reg_named_buff_firstkey||5.009005|
2242 +reg_named_buff_iter|||
2243 +reg_named_buff_nextkey||5.009005|
2244 +reg_named_buff_scalar||5.009005|
2247 +reg_numbered_buff_fetch|||
2248 +reg_numbered_buff_length|||
2249 +reg_numbered_buff_store|||
2258 +regclass_swash||5.009004|
2263 +regdump_extflags|||
2264 +regdump_intflags|||
2266 +regdupe_internal|||
2267 +regexec_flags||5.005000|
2268 +regfree_internal||5.009005|
2273 +reginitcolors||5.006000|
2290 +report_redefined_cv|||
2292 +report_wrongway_fh|||
2293 +require_pv||5.006000|
2300 +rsignal_state||5.004000|
2304 +runops_debug||5.005000|
2305 +runops_standard||5.005000|
2306 +rv2cv_op_cv||5.013006|
2311 +safesyscalloc||5.006000|n
2312 +safesysfree||5.006000|n
2313 +safesysmalloc||5.006000|n
2314 +safesysrealloc||5.006000|n
2316 +save_I16||5.004000|
2319 +save_adelete||5.011000|
2320 +save_aelem_flags||5.011000|
2321 +save_aelem||5.004050|
2322 +save_alloc||5.006000|
2325 +save_bool||5.008001|
2328 +save_destructor_x||5.006000|
2329 +save_destructor||5.006000|
2333 +save_generic_pvref||5.006001|
2334 +save_generic_svref||5.005030|
2337 +save_hdelete||5.011000|
2339 +save_helem_flags||5.011000|
2340 +save_helem||5.004050|
2341 +save_hints||5.010001|
2349 +save_magic_flags|||
2350 +save_mortalizesv||5.007001|
2353 +save_padsv_and_mortalize||5.010001|
2355 +save_pushi32ptr||5.010001|
2356 +save_pushptri32ptr|||
2357 +save_pushptrptr||5.010001|
2358 +save_pushptr||5.010001|
2359 +save_re_context||5.006000|
2362 +save_set_svflags||5.009000|
2363 +save_shared_pvref||5.007003|
2366 +save_vptr||5.006000|
2370 +savesharedpvn||5.009005|
2371 +savesharedpvs||5.013006|
2372 +savesharedpv||5.007003|
2373 +savesharedsvpv||5.013006|
2374 +savestack_grow_cnt||5.008001|
2376 +savesvpv||5.009002|
2378 +scalar_mod_type|||n
2384 +scan_bin||5.006000|
2391 +scan_inputsymbol|||
2392 +scan_num||5.007001|
2398 +scan_version||5.009001|
2399 +scan_vstring||5.009005|
2401 +screaminstr||5.005000|
2405 +set_context||5.006000|n
2406 +set_numeric_local||5.006000|
2407 +set_numeric_radix||5.006000|
2408 +set_numeric_standard||5.006000|
2411 +share_hek||5.004000|
2423 +sortsv_flags||5.009003|
2425 +space_join_names_mortal|||
2430 +start_subparse||5.004000|
2438 +str_to_version||5.006000|
2447 +sv_2bool_flags||5.013006|
2452 +sv_2iuv_non_preserve|||
2453 +sv_2iv_flags||5.009001|
2457 +sv_2nv_flags||5.013001|
2458 +sv_2pv_flags|5.007002||p
2459 +sv_2pv_nolen|5.006000||p
2460 +sv_2pvbyte_nolen|5.006000||p
2461 +sv_2pvbyte|5.006000||p
2462 +sv_2pvutf8_nolen||5.006000|
2463 +sv_2pvutf8||5.006000|
2465 +sv_2uv_flags||5.009001|
2471 +sv_cat_decode||5.008001|
2472 +sv_catpv_flags||5.013006|
2473 +sv_catpv_mg|5.004050||p
2474 +sv_catpv_nomg||5.013006|
2475 +sv_catpvf_mg_nocontext|||pvn
2476 +sv_catpvf_mg|5.006000|5.004000|pv
2477 +sv_catpvf_nocontext|||vn
2478 +sv_catpvf||5.004000|v
2479 +sv_catpvn_flags||5.007002|
2480 +sv_catpvn_mg|5.004050||p
2481 +sv_catpvn_nomg|5.007002||p
2483 +sv_catpvs_flags||5.013006|
2484 +sv_catpvs_mg||5.013006|
2485 +sv_catpvs_nomg||5.013006|
2486 +sv_catpvs|5.009003||p
2488 +sv_catsv_flags||5.007002|
2489 +sv_catsv_mg|5.004050||p
2490 +sv_catsv_nomg|5.007002||p
2499 +sv_cmp_flags||5.013006|
2500 +sv_cmp_locale_flags||5.013006|
2501 +sv_cmp_locale||5.004000|
2503 +sv_collxfrm_flags||5.013006|
2505 +sv_copypv_flags||5.017002|
2506 +sv_copypv_nomg||5.017002|
2508 +sv_dec_nomg||5.013002|
2511 +sv_derived_from_pvn||5.015004|
2512 +sv_derived_from_pv||5.015004|
2513 +sv_derived_from_sv||5.015004|
2514 +sv_derived_from||5.004000|
2515 +sv_destroyable||5.010000|
2517 +sv_does_pvn||5.015004|
2518 +sv_does_pv||5.015004|
2519 +sv_does_sv||5.015004|
2523 +sv_dup_inc_multiple|||
2526 +sv_eq_flags||5.013006|
2529 +sv_force_normal_flags||5.007001|
2530 +sv_force_normal||5.006000|
2537 +sv_inc_nomg||5.013002|
2539 +sv_insert_flags||5.010001|
2544 +sv_kill_backrefs|||
2545 +sv_len_utf8_nomg|||
2546 +sv_len_utf8||5.006000|
2548 +sv_magic_portable|5.019003|5.004000|p
2549 +sv_magicext_mglob|||
2550 +sv_magicext||5.007003|
2552 +sv_mortalcopy_flags|||
2557 +sv_nolocking||5.007003|
2558 +sv_nosharing||5.007003|
2562 +sv_pos_b2u_flags||5.019003|
2563 +sv_pos_b2u_midway|||
2564 +sv_pos_b2u||5.006000|
2565 +sv_pos_u2b_cached|||
2566 +sv_pos_u2b_flags||5.011005|
2567 +sv_pos_u2b_forwards|||n
2568 +sv_pos_u2b_midway|||n
2569 +sv_pos_u2b||5.006000|
2570 +sv_pvbyten_force||5.006000|
2571 +sv_pvbyten||5.006000|
2572 +sv_pvbyte||5.006000|
2573 +sv_pvn_force_flags|5.007002||p
2575 +sv_pvn_nomg|5.007003|5.005000|p
2577 +sv_pvutf8n_force||5.006000|
2578 +sv_pvutf8n||5.006000|
2579 +sv_pvutf8||5.006000|
2581 +sv_recode_to_utf8||5.007003|
2589 +sv_rvweaken||5.006000|
2591 +sv_setiv_mg|5.004050||p
2593 +sv_setnv_mg|5.006000||p
2595 +sv_setpv_mg|5.004050||p
2596 +sv_setpvf_mg_nocontext|||pvn
2597 +sv_setpvf_mg|5.006000|5.004000|pv
2598 +sv_setpvf_nocontext|||vn
2599 +sv_setpvf||5.004000|v
2600 +sv_setpviv_mg||5.008001|
2601 +sv_setpviv||5.008001|
2602 +sv_setpvn_mg|5.004050||p
2604 +sv_setpvs_mg||5.013006|
2605 +sv_setpvs|5.009004||p
2610 +sv_setref_pvs||5.019003|
2612 +sv_setref_uv||5.007001|
2614 +sv_setsv_flags||5.007002|
2615 +sv_setsv_mg|5.004050||p
2616 +sv_setsv_nomg|5.007002||p
2618 +sv_setuv_mg|5.004050||p
2619 +sv_setuv|5.004000||p
2620 +sv_tainted||5.004000|
2621 +sv_taint||5.004000|
2624 +sv_uni_display||5.007003|
2625 +sv_unmagicext||5.013008|
2627 +sv_unref_flags||5.007001|
2629 +sv_untaint||5.004000|
2631 +sv_usepvn_flags||5.009004|
2632 +sv_usepvn_mg|5.004050||p
2634 +sv_utf8_decode||5.006000|
2635 +sv_utf8_downgrade||5.006000|
2636 +sv_utf8_encode||5.006000|
2637 +sv_utf8_upgrade_flags_grow||5.011000|
2638 +sv_utf8_upgrade_flags||5.007002|
2639 +sv_utf8_upgrade_nomg||5.007002|
2640 +sv_utf8_upgrade||5.007001|
2642 +sv_vcatpvf_mg|5.006000|5.004000|p
2643 +sv_vcatpvfn_flags||5.017002|
2644 +sv_vcatpvfn||5.004000|
2645 +sv_vcatpvf|5.006000|5.004000|p
2646 +sv_vsetpvf_mg|5.006000|5.004000|p
2647 +sv_vsetpvfn||5.004000|
2648 +sv_vsetpvf|5.006000|5.004000|p
2652 +swash_fetch||5.007002|
2653 +swash_init||5.006000|
2655 +sys_init3||5.010000|n
2656 +sys_init||5.010000|n
2657 +sys_intern_clear|||
2660 +sys_term||5.010000|n
2664 +tmps_grow||5.006000|
2665 +toFOLD_uni||5.007003|
2666 +toFOLD_utf8||5.019001|
2668 +toLOWER_L1||5.019001|
2669 +toLOWER_LC||5.004000|
2670 +toLOWER_uni||5.007003|
2671 +toLOWER_utf8||5.015007|
2673 +toTITLE_uni||5.007003|
2674 +toTITLE_utf8||5.015007|
2676 +toUPPER_uni||5.007003|
2677 +toUPPER_utf8||5.015007|
2681 +to_uni_fold||5.007003|
2682 +to_uni_lower_lc||5.006000|
2683 +to_uni_lower||5.007003|
2684 +to_uni_title_lc||5.006000|
2685 +to_uni_title||5.007003|
2686 +to_uni_upper_lc||5.006000|
2687 +to_uni_upper||5.007003|
2688 +to_utf8_case||5.007003|
2689 +to_utf8_fold||5.015007|
2690 +to_utf8_lower||5.015007|
2692 +to_utf8_title||5.015007|
2693 +to_utf8_upper||5.015007|
2699 +too_few_arguments_pv|||
2700 +too_few_arguments_sv|||
2701 +too_many_arguments_pv|||
2702 +too_many_arguments_sv|||
2703 +translate_substr_offsets|||
2709 +unpack_str||5.007003|
2710 +unpackstring||5.008001|
2711 +unreferenced_to_tmp_stack|||
2712 +unshare_hek_or_pvn|||
2714 +unsharepvn||5.004000|
2715 +unwind_handler_stack|||
2716 +update_debugger_info|||
2717 +upg_version||5.009005|
2719 +utf16_textfilter|||
2720 +utf16_to_utf8_reversed||5.006001|
2721 +utf16_to_utf8||5.006001|
2722 +utf8_distance||5.006000|
2723 +utf8_hop||5.006000|
2724 +utf8_length||5.007001|
2725 +utf8_mg_len_cache_update|||
2726 +utf8_mg_pos_cache_update|||
2727 +utf8_to_bytes||5.006001|
2728 +utf8_to_uvchr_buf||5.015009|
2729 +utf8_to_uvchr||5.007001|
2730 +utf8_to_uvuni_buf||5.015009|
2731 +utf8_to_uvuni||5.007001|
2733 +utf8n_to_uvuni||5.007001|
2735 +uvchr_to_utf8_flags||5.007003|
2737 +uvuni_to_utf8_flags||5.007003|
2738 +uvuni_to_utf8||5.007001|
2739 +valid_utf8_to_uvchr|||
2740 +valid_utf8_to_uvuni||5.015009|
2751 +vload_module|5.006000||p
2753 +vnewSVpvf|5.006000|5.004000|p
2756 +vstringify||5.009000|
2761 +warn_nocontext|||vn
2763 +warner_nocontext|||vn
2764 +warner|5.006000|5.004000|pv
2768 +whichsig_pvn||5.015004|
2769 +whichsig_pv||5.015004|
2770 +whichsig_sv||5.015004|
2772 +win32_croak_not_implemented|||n
2773 +with_queued_errors|||
2774 +wrap_op_checker||5.015008|
2776 +xmldump_all_perl|||
2782 +xmldump_packsubs_perl|||
2783 +xmldump_packsubs|||
2784 +xmldump_sub_perl|||
2787 +xs_apiversion_bootcheck|||
2788 +xs_version_bootcheck|||
2798 +if (exists $opt{'list-unsupported'}) {
2800 + for $f (sort { lc $a cmp lc $b } keys %API) {
2801 + next unless $API{$f}{todo};
2802 + print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
2807 +# Scan for possible replacement candidates
2809 +my(%replace, %need, %hints, %warnings, %depends);
2811 +my($hint, $define, $function);
2817 + / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
2818 + | "[^"\\]*(?:\\.[^"\\]*)*"
2819 + | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
2820 + grep { exists $API{$_} } $code =~ /(\w+)/mg;
2825 + my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
2826 + if (m{^\s*\*\s(.*?)\s*$}) {
2827 + for (@{$hint->[1]}) {
2828 + $h->{$_} ||= ''; # suppress warning with older perls
2829 + $h->{$_} .= "$1\n";
2832 + else { undef $hint }
2835 + $hint = [$1, [split /,?\s+/, $2]]
2836 + if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
2839 + if ($define->[1] =~ /\\$/) {
2840 + $define->[1] .= $_;
2843 + if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
2844 + my @n = find_api($define->[1]);
2845 + push @{$depends{$define->[0]}}, @n if @n
2851 + $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
2855 + if (exists $API{$function->[0]}) {
2856 + my @n = find_api($function->[1]);
2857 + push @{$depends{$function->[0]}}, @n if @n
2862 + $function->[1] .= $_;
2866 + $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
2868 + $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
2869 + $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
2870 + $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
2871 + $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
2873 + if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
2874 + my @deps = map { s/\s+//g; $_ } split /,/, $3;
2876 + for $d (map { s/\s+//g; $_ } split /,/, $1) {
2877 + push @{$depends{$d}}, @deps;
2881 + $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
2884 +for (values %depends) {
2886 + $_ = [sort grep !$s{$_}++, @$_];
2889 +if (exists $opt{'api-info'}) {
2892 + my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
2893 + for $f (sort { lc $a cmp lc $b } keys %API) {
2894 + next unless $f =~ /$match/;
2895 + print "\n=== $f ===\n\n";
2897 + if ($API{$f}{base} || $API{$f}{todo}) {
2898 + my $base = format_version($API{$f}{base} || $API{$f}{todo});
2899 + print "Supported at least starting from perl-$base.\n";
2902 + if ($API{$f}{provided}) {
2903 + my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
2904 + print "Support by $ppport provided back to perl-$todo.\n";
2905 + print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
2906 + print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
2907 + print "\n$hints{$f}" if exists $hints{$f};
2908 + print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
2911 + print "No portability information available.\n" unless $info;
2914 + $count or print "Found no API matching '$opt{'api-info'}'.";
2919 +if (exists $opt{'list-provided'}) {
2921 + for $f (sort { lc $a cmp lc $b } keys %API) {
2922 + next unless $API{$f}{provided};
2924 + push @flags, 'explicit' if exists $need{$f};
2925 + push @flags, 'depend' if exists $depends{$f};
2926 + push @flags, 'hint' if exists $hints{$f};
2927 + push @flags, 'warning' if exists $warnings{$f};
2928 + my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
2929 + print "$f$flags\n";
2935 +my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
2936 +my $srcext = join '|', map { quotemeta $_ } @srcext;
2943 + push @files, $_ unless $seen{$_}++;
2945 + else { warn "'$_' is not a file.\n" }
2948 + my @new = grep { -f } glob $_
2949 + or warn "'$_' does not exist.\n";
2950 + push @files, grep { !$seen{$_}++ } @new;
2956 + require File::Find;
2957 + File::Find::find(sub {
2958 + $File::Find::name =~ /($srcext)$/i
2959 + and push @files, $File::Find::name;
2963 + @files = map { glob "*$_" } @srcext;
2967 +if (!@ARGV || $opt{filter}) {
2969 + my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
2971 + my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
2972 + push @{ $out ? \@out : \@in }, $_;
2974 + if (@ARGV && @out) {
2975 + warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
2980 +die "No input files given!\n" unless @files;
2982 +my(%files, %global, %revreplace);
2983 +%revreplace = reverse %replace;
2985 +my $patch_opened = 0;
2987 +for $filename (@files) {
2988 + unless (open IN, "<$filename") {
2989 + warn "Unable to read from $filename: $!\n";
2993 + info("Scanning $filename ...");
2995 + my $c = do { local $/; <IN> };
2998 + my %file = (orig => $c, changes => 0);
3000 + # Temporarily remove C/XS comments and strings from the code
3004 + ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
3005 + | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
3006 + | ( ^$HS*\#[^\r\n]*
3007 + | "[^"\\]*(?:\\.[^"\\]*)*"
3008 + | '[^'\\]*(?:\\.[^'\\]*)*'
3009 + | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
3010 + }{ defined $2 and push @ccom, $2;
3011 + defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
3013 + $file{ccom} = \@ccom;
3015 + $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
3019 + for $func (keys %API) {
3020 + my $match = $func;
3021 + $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3022 + if ($c =~ /\b(?:Perl_)?($match)\b/) {
3023 + $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3024 + $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3025 + if (exists $API{$func}{provided}) {
3026 + $file{uses_provided}{$func}++;
3027 + if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
3028 + $file{uses}{$func}++;
3029 + my @deps = rec_depend($func);
3031 + $file{uses_deps}{$func} = \@deps;
3033 + $file{uses}{$_} = 0 unless exists $file{uses}{$_};
3036 + for ($func, @deps) {
3037 + $file{needs}{$_} = 'static' if exists $need{$_};
3041 + if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
3042 + if ($c =~ /\b$func\b/) {
3043 + $file{uses_todo}{$func}++;
3049 + while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3050 + if (exists $need{$2}) {
3051 + $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
3053 + else { warning("Possibly wrong #define $1 in $filename") }
3056 + for (qw(uses needs uses_todo needed_global needed_static)) {
3057 + for $func (keys %{$file{$_}}) {
3058 + push @{$global{$_}{$func}}, $filename;
3062 + $files{$filename} = \%file;
3065 +# Globally resolve NEED_'s
3067 +for $need (keys %{$global{needs}}) {
3068 + if (@{$global{needs}{$need}} > 1) {
3069 + my @targets = @{$global{needs}{$need}};
3070 + my @t = grep $files{$_}{needed_global}{$need}, @targets;
3071 + @targets = @t if @t;
3072 + @t = grep /\.xs$/i, @targets;
3073 + @targets = @t if @t;
3074 + my $target = shift @targets;
3075 + $files{$target}{needs}{$need} = 'global';
3076 + for (@{$global{needs}{$need}}) {
3077 + $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3082 +for $filename (@files) {
3083 + exists $files{$filename} or next;
3085 + info("=== Analyzing $filename ===");
3087 + my %file = %{$files{$filename}};
3089 + my $c = $file{code};
3092 + for $func (sort keys %{$file{uses_Perl}}) {
3093 + if ($API{$func}{varargs}) {
3094 + unless ($API{$func}{nothxarg}) {
3095 + my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3096 + { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3098 + warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3099 + $file{changes} += $changes;
3104 + warning("Uses Perl_$func instead of $func");
3105 + $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3110 + for $func (sort keys %{$file{uses_replace}}) {
3111 + warning("Uses $func instead of $replace{$func}");
3112 + $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3115 + for $func (sort keys %{$file{uses_provided}}) {
3116 + if ($file{uses}{$func}) {
3117 + if (exists $file{uses_deps}{$func}) {
3118 + diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3121 + diag("Uses $func");
3124 + $warnings += hint($func);
3127 + unless ($opt{quiet}) {
3128 + for $func (sort keys %{$file{uses_todo}}) {
3129 + print "*** WARNING: Uses $func, which may not be portable below perl ",
3130 + format_version($API{$func}{todo}), ", even with '$ppport'\n";
3135 + for $func (sort keys %{$file{needed_static}}) {
3137 + if (not exists $file{uses}{$func}) {
3138 + $message = "No need to define NEED_$func if $func is never used";
3140 + elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
3141 + $message = "No need to define NEED_$func when already needed globally";
3145 + $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
3149 + for $func (sort keys %{$file{needed_global}}) {
3151 + if (not exists $global{uses}{$func}) {
3152 + $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
3154 + elsif (exists $file{needs}{$func}) {
3155 + if ($file{needs}{$func} eq 'extern') {
3156 + $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
3158 + elsif ($file{needs}{$func} eq 'static') {
3159 + $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
3164 + $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
3168 + $file{needs_inc_ppport} = keys %{$file{uses}};
3170 + if ($file{needs_inc_ppport}) {
3173 + for $func (sort keys %{$file{needs}}) {
3174 + my $type = $file{needs}{$func};
3175 + next if $type eq 'extern';
3176 + my $suffix = $type eq 'global' ? '_GLOBAL' : '';
3177 + unless (exists $file{"needed_$type"}{$func}) {
3178 + if ($type eq 'global') {
3179 + diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
3182 + diag("File needs $func, adding static request");
3184 + $pp .= "#define NEED_$func$suffix\n";
3188 + if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
3193 + unless ($file{has_inc_ppport}) {
3194 + diag("Needs to include '$ppport'");
3195 + $pp .= qq(#include "$ppport"\n)
3199 + $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
3200 + || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
3201 + || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
3202 + || ($c =~ s/^/$pp/);
3206 + if ($file{has_inc_ppport}) {
3207 + diag("No need to include '$ppport'");
3208 + $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
3212 + # put back in our C comments
3215 + my @ccom = @{$file{ccom}};
3216 + for $ix (0 .. $#ccom) {
3217 + if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
3219 + $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
3222 + $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
3227 + my $s = $cppc != 1 ? 's' : '';
3228 + warning("Uses $cppc C++ style comment$s, which is not portable");
3231 + my $s = $warnings != 1 ? 's' : '';
3232 + my $warn = $warnings ? " ($warnings warning$s)" : '';
3233 + info("Analysis completed$warn");
3235 + if ($file{changes}) {
3236 + if (exists $opt{copy}) {
3237 + my $newfile = "$filename$opt{copy}";
3238 + if (-e $newfile) {
3239 + error("'$newfile' already exists, refusing to write copy of '$filename'");
3243 + if (open F, ">$newfile") {
3244 + info("Writing copy of '$filename' with changes to '$newfile'");
3249 + error("Cannot open '$newfile' for writing: $!");
3253 + elsif (exists $opt{patch} || $opt{changes}) {
3254 + if (exists $opt{patch}) {
3255 + unless ($patch_opened) {
3256 + if (open PATCH, ">$opt{patch}") {
3257 + $patch_opened = 1;
3260 + error("Cannot open '$opt{patch}' for writing: $!");
3261 + delete $opt{patch};
3262 + $opt{changes} = 1;
3266 + mydiff(\*PATCH, $filename, $c);
3270 + info("Suggested changes:");
3271 + mydiff(\*STDOUT, $filename, $c);
3275 + my $s = $file{changes} == 1 ? '' : 's';
3276 + info("$file{changes} potentially required change$s detected");
3280 + info("Looks good");
3284 +close PATCH if $patch_opened;
3289 +sub try_use { eval "use @_;"; return $@ eq '' }
3294 + my($file, $str) = @_;
3297 + if (exists $opt{diff}) {
3298 + $diff = run_diff($opt{diff}, $file, $str);
3301 + if (!defined $diff and try_use('Text::Diff')) {
3302 + $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
3303 + $diff = <<HEADER . $diff;
3309 + if (!defined $diff) {
3310 + $diff = run_diff('diff -u', $file, $str);
3313 + if (!defined $diff) {
3314 + $diff = run_diff('diff', $file, $str);
3317 + if (!defined $diff) {
3318 + error("Cannot generate a diff. Please install Text::Diff or use --copy.");
3327 + my($prog, $file, $str) = @_;
3328 + my $tmp = 'dppptemp';
3333 + while (-e "$tmp.$suf") { $suf++ }
3334 + $tmp = "$tmp.$suf";
3336 + if (open F, ">$tmp") {
3340 + if (open F, "$prog $file $tmp |") {
3342 + s/\Q$tmp\E/$file.patched/;
3353 + error("Cannot open '$tmp' for writing: $!");
3361 + my($func, $seen) = @_;
3362 + return () unless exists $depends{$func};
3363 + $seen = {%{$seen||{}}};
3364 + return () if $seen->{$func}++;
3366 + grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
3373 + if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
3374 + return ($1, $2, $3);
3376 + elsif ($ver !~ /^\d+\.[\d_]+$/) {
3377 + die "cannot parse version '$ver'\n";
3381 + $ver =~ s/$/000000/;
3383 + my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3388 + if ($r < 5 || ($r == 5 && $v < 6)) {
3390 + die "cannot parse version '$ver'\n";
3394 + return ($r, $v, $s);
3401 + $ver =~ s/$/000000/;
3402 + my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3407 + if ($r < 5 || ($r == 5 && $v < 6)) {
3409 + die "invalid version '$ver'\n";
3413 + $ver = sprintf "%d.%03d", $r, $v;
3414 + $s > 0 and $ver .= sprintf "_%02d", $s;
3419 + return sprintf "%d.%d.%d", $r, $v, $s;
3424 + $opt{quiet} and return;
3430 + $opt{quiet} and return;
3431 + $opt{diag} and print @_, "\n";
3436 + $opt{quiet} and return;
3437 + print "*** ", @_, "\n";
3442 + print "*** ERROR: ", @_, "\n";
3446 +my %given_warnings;
3449 + $opt{quiet} and return;
3452 + if (exists $warnings{$func} && !$given_warnings{$func}++) {
3453 + my $warn = $warnings{$func};
3454 + $warn =~ s!^!*** !mg;
3455 + print "*** WARNING: $func\n", $warn;
3458 + if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
3459 + my $hint = $hints{$func};
3460 + $hint =~ s/^/ /mg;
3461 + print " --- hint for $func ---\n", $hint;
3468 + my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
3469 + my %M = ( 'I' => '*' );
3470 + $usage =~ s/^\s*perl\s+\S+/$^X $0/;
3471 + $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
3477 +See perldoc $0 for details.
3486 + my $self = do { local(@ARGV,$/)=($0); <> };
3487 + my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
3488 + $copy =~ s/^(?=\S+)/ /gms;
3489 + $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
3490 + $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
3491 +if (\@ARGV && \$ARGV[0] eq '--unstrip') {
3492 + eval { require Devel::PPPort };
3493 + \$@ and die "Cannot require Devel::PPPort, please install.\\n";
3494 + if (eval \$Devel::PPPort::VERSION < $VERSION) {
3495 + die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
3496 + . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
3497 + . "Please install a newer version, or --unstrip will not work.\\n";
3499 + Devel::PPPort::WriteFile(\$0);
3504 +Sorry, but this is a stripped version of \$0.
3506 +To be able to use its original script and doc functionality,
3507 +please try to regenerate this file using:
3509 + \$^X \$0 --unstrip
3513 + my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
3515 + / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
3516 + | ( "[^"\\]*(?:\\.[^"\\]*)*"
3517 + | '[^'\\]*(?:\\.[^'\\]*)*' )
3518 + | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
3521 + $c =~ s!^\s*#\s*!#!mg;
3524 + open OUT, ">$0" or die "cannot strip $0: $!\n";
3525 + print OUT "$pl$c\n";
3533 +#ifndef _P_P_PORTABILITY_H_
3534 +#define _P_P_PORTABILITY_H_
3536 +#ifndef DPPP_NAMESPACE
3537 +# define DPPP_NAMESPACE DPPP_
3540 +#define DPPP_CAT2(x,y) CAT2(x,y)
3541 +#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
3543 +#ifndef PERL_REVISION
3544 +# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
3545 +# define PERL_PATCHLEVEL_H_IMPLICIT
3546 +# include <patchlevel.h>
3548 +# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
3549 +# include <could_not_find_Perl_patchlevel.h>
3551 +# ifndef PERL_REVISION
3552 +# define PERL_REVISION (5)
3554 +# define PERL_VERSION PATCHLEVEL
3555 +# define PERL_SUBVERSION SUBVERSION
3556 + /* Replace PERL_PATCHLEVEL with PERL_VERSION */
3561 +#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
3562 +#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
3564 +/* It is very unlikely that anyone will try to use this with Perl 6
3565 + (or greater), but who knows.
3567 +#if PERL_REVISION != 5
3568 +# error ppport.h only works with Perl version 5
3569 +#endif /* PERL_REVISION != 5 */
3571 +# define dTHR dNOOP
3574 +# define dTHX dNOOP
3578 +# define dTHXa(x) dNOOP
3596 +#if (PERL_BCDVERSION < 0x5006000)
3597 +# ifdef USE_THREADS
3599 +# define aTHXR_ thr,
3604 +# define dTHXR dTHR
3606 +# define aTHXR aTHX
3607 +# define aTHXR_ aTHX_
3608 +# define dTHXR dTHX
3611 +# define dTHXoa(x) dTHXa(x)
3615 +# include <limits.h>
3618 +#ifndef PERL_UCHAR_MIN
3619 +# define PERL_UCHAR_MIN ((unsigned char)0)
3622 +#ifndef PERL_UCHAR_MAX
3624 +# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
3627 +# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
3629 +# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
3634 +#ifndef PERL_USHORT_MIN
3635 +# define PERL_USHORT_MIN ((unsigned short)0)
3638 +#ifndef PERL_USHORT_MAX
3640 +# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
3643 +# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
3646 +# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
3648 +# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
3654 +#ifndef PERL_SHORT_MAX
3656 +# define PERL_SHORT_MAX ((short)SHORT_MAX)
3658 +# ifdef MAXSHORT /* Often used in <values.h> */
3659 +# define PERL_SHORT_MAX ((short)MAXSHORT)
3662 +# define PERL_SHORT_MAX ((short)SHRT_MAX)
3664 +# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
3670 +#ifndef PERL_SHORT_MIN
3672 +# define PERL_SHORT_MIN ((short)SHORT_MIN)
3675 +# define PERL_SHORT_MIN ((short)MINSHORT)
3678 +# define PERL_SHORT_MIN ((short)SHRT_MIN)
3680 +# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
3686 +#ifndef PERL_UINT_MAX
3688 +# define PERL_UINT_MAX ((unsigned int)UINT_MAX)
3691 +# define PERL_UINT_MAX ((unsigned int)MAXUINT)
3693 +# define PERL_UINT_MAX (~(unsigned int)0)
3698 +#ifndef PERL_UINT_MIN
3699 +# define PERL_UINT_MIN ((unsigned int)0)
3702 +#ifndef PERL_INT_MAX
3704 +# define PERL_INT_MAX ((int)INT_MAX)
3706 +# ifdef MAXINT /* Often used in <values.h> */
3707 +# define PERL_INT_MAX ((int)MAXINT)
3709 +# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
3714 +#ifndef PERL_INT_MIN
3716 +# define PERL_INT_MIN ((int)INT_MIN)
3719 +# define PERL_INT_MIN ((int)MININT)
3721 +# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
3726 +#ifndef PERL_ULONG_MAX
3728 +# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
3731 +# define PERL_ULONG_MAX ((unsigned long)MAXULONG)
3733 +# define PERL_ULONG_MAX (~(unsigned long)0)
3738 +#ifndef PERL_ULONG_MIN
3739 +# define PERL_ULONG_MIN ((unsigned long)0L)
3742 +#ifndef PERL_LONG_MAX
3744 +# define PERL_LONG_MAX ((long)LONG_MAX)
3747 +# define PERL_LONG_MAX ((long)MAXLONG)
3749 +# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
3754 +#ifndef PERL_LONG_MIN
3756 +# define PERL_LONG_MIN ((long)LONG_MIN)
3759 +# define PERL_LONG_MIN ((long)MINLONG)
3761 +# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
3766 +#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
3767 +# ifndef PERL_UQUAD_MAX
3768 +# ifdef ULONGLONG_MAX
3769 +# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
3771 +# ifdef MAXULONGLONG
3772 +# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
3774 +# define PERL_UQUAD_MAX (~(unsigned long long)0)
3779 +# ifndef PERL_UQUAD_MIN
3780 +# define PERL_UQUAD_MIN ((unsigned long long)0L)
3783 +# ifndef PERL_QUAD_MAX
3784 +# ifdef LONGLONG_MAX
3785 +# define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
3787 +# ifdef MAXLONGLONG
3788 +# define PERL_QUAD_MAX ((long long)MAXLONGLONG)
3790 +# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
3795 +# ifndef PERL_QUAD_MIN
3796 +# ifdef LONGLONG_MIN
3797 +# define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
3799 +# ifdef MINLONGLONG
3800 +# define PERL_QUAD_MIN ((long long)MINLONGLONG)
3802 +# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
3808 +/* This is based on code from 5.003 perl.h */
3812 +# define IVTYPE int
3816 +# define IV_MIN PERL_INT_MIN
3820 +# define IV_MAX PERL_INT_MAX
3824 +# define UV_MIN PERL_UINT_MIN
3828 +# define UV_MAX PERL_UINT_MAX
3833 +# define IVSIZE INTSIZE
3838 +# if defined(convex) || defined(uts)
3840 +# define IVTYPE long long
3844 +# define IV_MIN PERL_QUAD_MIN
3848 +# define IV_MAX PERL_QUAD_MAX
3852 +# define UV_MIN PERL_UQUAD_MIN
3856 +# define UV_MAX PERL_UQUAD_MAX
3859 +# ifdef LONGLONGSIZE
3861 +# define IVSIZE LONGLONGSIZE
3867 +# define IVTYPE long
3871 +# define IV_MIN PERL_LONG_MIN
3875 +# define IV_MAX PERL_LONG_MAX
3879 +# define UV_MIN PERL_ULONG_MIN
3883 +# define UV_MAX PERL_ULONG_MAX
3888 +# define IVSIZE LONGSIZE
3899 +# define LONGSIZE 8
3902 +#ifndef PERL_QUAD_MIN
3903 +# define PERL_QUAD_MIN IV_MIN
3906 +#ifndef PERL_QUAD_MAX
3907 +# define PERL_QUAD_MAX IV_MAX
3910 +#ifndef PERL_UQUAD_MIN
3911 +# define PERL_UQUAD_MIN UV_MIN
3914 +#ifndef PERL_UQUAD_MAX
3915 +# define PERL_UQUAD_MAX UV_MAX
3920 +# define IVTYPE long
3924 +# define LONGSIZE 4
3928 +# define IV_MIN PERL_LONG_MIN
3932 +# define IV_MAX PERL_LONG_MAX
3936 +# define UV_MIN PERL_ULONG_MIN
3940 +# define UV_MAX PERL_ULONG_MAX
3947 +# define IVSIZE LONGSIZE
3949 +# define IVSIZE 4 /* A bold guess, but the best we can make. */
3953 +# define UVTYPE unsigned IVTYPE
3957 +# define UVSIZE IVSIZE
3960 +# define sv_setuv(sv, uv) \
3963 + if (TeMpUv <= IV_MAX) \
3964 + sv_setiv(sv, TeMpUv); \
3966 + sv_setnv(sv, (double)TeMpUv); \
3970 +# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
3973 +# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
3977 +# define SvUVX(sv) ((UV)SvIVX(sv))
3981 +# define SvUVXx(sv) SvUVX(sv)
3985 +# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
3989 +# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
3993 + * Always use the SvUVx() macro instead of sv_uv().
3996 +# define sv_uv(sv) SvUVx(sv)
3999 +#if !defined(SvUOK) && defined(SvIOK_UV)
4000 +# define SvUOK(sv) SvIOK_UV(sv)
4003 +# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
4006 +#ifndef XSRETURN_UV
4007 +# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
4010 +# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
4014 +# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
4019 +# define memNE(s1,s2,l) (memcmp(s1,s2,l))
4023 +# define memEQ(s1,s2,l) (!memcmp(s1,s2,l))
4028 +# define memNE(s1,s2,l) (bcmp(s1,s2,l))
4032 +# define memEQ(s1,s2,l) (!bcmp(s1,s2,l))
4037 +# define memEQs(s1, l, s2) \
4038 + (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
4042 +# define memNEs(s1, l, s2) !memEQs(s1, l, s2)
4045 +# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
4049 +# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
4054 +# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
4059 +# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
4064 +# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
4068 +# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
4072 +# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
4076 +# define Poison(d,n,t) PoisonFree(d,n,t)
4079 +# define Newx(v,n,t) New(0,v,n,t)
4083 +# define Newxc(v,n,t,c) Newc(0,v,n,t,c)
4087 +# define Newxz(v,n,t) Newz(0,v,n,t)
4090 +#ifndef PERL_UNUSED_DECL
4091 +# ifdef HASATTRIBUTE
4092 +# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
4093 +# define PERL_UNUSED_DECL
4095 +# define PERL_UNUSED_DECL __attribute__((unused))
4098 +# define PERL_UNUSED_DECL
4102 +#ifndef PERL_UNUSED_ARG
4103 +# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
4105 +# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
4107 +# define PERL_UNUSED_ARG(x) ((void)x)
4111 +#ifndef PERL_UNUSED_VAR
4112 +# define PERL_UNUSED_VAR(x) ((void)x)
4115 +#ifndef PERL_UNUSED_CONTEXT
4116 +# ifdef USE_ITHREADS
4117 +# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
4119 +# define PERL_UNUSED_CONTEXT
4123 +# define NOOP /*EMPTY*/(void)0
4127 +# define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
4131 +# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
4132 +# define NVTYPE long double
4134 +# define NVTYPE double
4140 +# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
4142 +# define INT2PTR(any,d) (any)(d)
4144 +# if PTRSIZE == LONGSIZE
4145 +# define PTRV unsigned long
4147 +# define PTRV unsigned
4149 +# define INT2PTR(any,d) (any)(PTRV)(d)
4154 +# if PTRSIZE == LONGSIZE
4155 +# define PTR2ul(p) (unsigned long)(p)
4157 +# define PTR2ul(p) INT2PTR(unsigned long,p)
4161 +# define PTR2nat(p) (PTRV)(p)
4165 +# define NUM2PTR(any,d) (any)PTR2nat(d)
4169 +# define PTR2IV(p) INT2PTR(IV,p)
4173 +# define PTR2UV(p) INT2PTR(UV,p)
4177 +# define PTR2NV(p) NUM2PTR(NV,p)
4180 +#undef START_EXTERN_C
4181 +#undef END_EXTERN_C
4184 +# define START_EXTERN_C extern "C" {
4185 +# define END_EXTERN_C }
4186 +# define EXTERN_C extern "C"
4188 +# define START_EXTERN_C
4189 +# define END_EXTERN_C
4190 +# define EXTERN_C extern
4193 +#if defined(PERL_GCC_PEDANTIC)
4194 +# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
4195 +# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
4199 +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
4200 +# ifndef PERL_USE_GCC_BRACE_GROUPS
4201 +# define PERL_USE_GCC_BRACE_GROUPS
4207 +#ifdef PERL_USE_GCC_BRACE_GROUPS
4208 +# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
4209 +# define STMT_END )
4211 +# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
4212 +# define STMT_START if (1)
4213 +# define STMT_END else (void)0
4215 +# define STMT_START do
4216 +# define STMT_END while (0)
4220 +# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
4223 +/* DEFSV appears first in 5.004_56 */
4225 +# define DEFSV GvSV(PL_defgv)
4229 +# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
4233 +# define DEFSV_set(sv) (DEFSV = (sv))
4236 +/* Older perls (<=5.003) lack AvFILLp */
4238 +# define AvFILLp AvFILL
4241 +# define ERRSV get_sv("@",FALSE)
4244 +/* Hint: gv_stashpvn
4245 + * This function's backport doesn't support the length parameter, but
4246 + * rather ignores it. Portability can only be ensured if the length
4247 + * parameter is used for speed reasons, but the length can always be
4248 + * correctly computed from the string argument.
4250 +#ifndef gv_stashpvn
4251 +# define gv_stashpvn(str,len,create) gv_stashpv(str,create)
4256 +# define get_cv perl_get_cv
4260 +# define get_sv perl_get_sv
4264 +# define get_av perl_get_av
4268 +# define get_hv perl_get_hv
4273 +# define dUNDERBAR dNOOP
4277 +# define UNDERBAR DEFSV
4280 +# define dAX I32 ax = MARK - PL_stack_base + 1
4284 +# define dITEMS I32 items = SP - MARK
4287 +# define dXSTARG SV * targ = sv_newmortal()
4290 +# define dAXMARK I32 ax = POPMARK; \
4291 + register SV ** const mark = PL_stack_base + ax++
4294 +# define XSprePUSH (sp = PL_stack_base + ax - 1)
4297 +#if (PERL_BCDVERSION < 0x5005000)
4299 +# define XSRETURN(off) \
4301 + PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
4306 +# define XSPROTO(name) void name(pTHX_ CV* cv)
4310 +# define SVfARG(p) ((void*)(p))
4313 +# define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
4316 +# define dVAR dNOOP
4321 +#ifndef UTF8_MAXBYTES
4322 +# define UTF8_MAXBYTES UTF8_MAXLEN
4325 +# define CPERLscope(x) x
4328 +# define PERL_HASH(hash,str,len) \
4330 + const char *s_PeRlHaSh = str; \
4331 + I32 i_PeRlHaSh = len; \
4332 + U32 hash_PeRlHaSh = 0; \
4333 + while (i_PeRlHaSh--) \
4334 + hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
4335 + (hash) = hash_PeRlHaSh; \
4339 +#ifndef PERLIO_FUNCS_DECL
4340 +# ifdef PERLIO_FUNCS_CONST
4341 +# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
4342 +# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
4344 +# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
4345 +# define PERLIO_FUNCS_CAST(funcs) (funcs)
4349 +/* provide these typedefs for older perls */
4350 +#if (PERL_BCDVERSION < 0x5009003)
4353 +typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
4355 +typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
4358 +typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
4362 +# define isPSXSPC(c) (isSPACE(c) || (c) == '\v')
4366 +# define isBLANK(c) ((c) == ' ' || (c) == '\t')
4371 +# define isALNUMC(c) isalnum(c)
4375 +# define isASCII(c) isascii(c)
4379 +# define isCNTRL(c) iscntrl(c)
4383 +# define isGRAPH(c) isgraph(c)
4387 +# define isPRINT(c) isprint(c)
4391 +# define isPUNCT(c) ispunct(c)
4395 +# define isXDIGIT(c) isxdigit(c)
4399 +# if (PERL_BCDVERSION < 0x5010000)
4401 + * The implementation in older perl versions includes all of the
4402 + * isSPACE() characters, which is wrong. The version provided by
4403 + * Devel::PPPort always overrides a present buggy version.
4409 +# define WIDEST_UTYPE U64TYPE
4411 +# define WIDEST_UTYPE U32
4414 +# define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
4418 +# define isASCII(c) ((WIDEST_UTYPE) (c) <= 127)
4422 +# define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
4426 +# define isGRAPH(c) (isALNUM(c) || isPUNCT(c))
4430 +# define isPRINT(c) (((c) >= 32 && (c) < 127))
4434 +# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
4438 +# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
4443 +#ifndef PERL_SIGNALS_UNSAFE_FLAG
4445 +#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
4447 +#if (PERL_BCDVERSION < 0x5008000)
4448 +# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG
4450 +# define D_PPP_PERL_SIGNALS_INIT 0
4453 +#if defined(NEED_PL_signals)
4454 +static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4455 +#elif defined(NEED_PL_signals_GLOBAL)
4456 +U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4458 +extern U32 DPPP_(my_PL_signals);
4460 +#define PL_signals DPPP_(my_PL_signals)
4465 + * Calling an op via PL_ppaddr requires passing a context argument
4466 + * for threaded builds. Since the context argument is different for
4467 + * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
4468 + * automatically be defined as the correct argument.
4471 +#if (PERL_BCDVERSION <= 0x5005005)
4473 +# define PL_ppaddr ppaddr
4474 +# define PL_no_modify no_modify
4478 +#if (PERL_BCDVERSION <= 0x5004005)
4480 +# define PL_DBsignal DBsignal
4481 +# define PL_DBsingle DBsingle
4482 +# define PL_DBsub DBsub
4483 +# define PL_DBtrace DBtrace
4485 +# define PL_bufend bufend
4486 +# define PL_bufptr bufptr
4487 +# define PL_compiling compiling
4488 +# define PL_copline copline
4489 +# define PL_curcop curcop
4490 +# define PL_curstash curstash
4491 +# define PL_debstash debstash
4492 +# define PL_defgv defgv
4493 +# define PL_diehook diehook
4494 +# define PL_dirty dirty
4495 +# define PL_dowarn dowarn
4496 +# define PL_errgv errgv
4497 +# define PL_error_count error_count
4498 +# define PL_expect expect
4499 +# define PL_hexdigit hexdigit
4500 +# define PL_hints hints
4501 +# define PL_in_my in_my
4502 +# define PL_laststatval laststatval
4503 +# define PL_lex_state lex_state
4504 +# define PL_lex_stuff lex_stuff
4505 +# define PL_linestr linestr
4507 +# define PL_perl_destruct_level perl_destruct_level
4508 +# define PL_perldb perldb
4509 +# define PL_rsfp_filters rsfp_filters
4510 +# define PL_rsfp rsfp
4511 +# define PL_stack_base stack_base
4512 +# define PL_stack_sp stack_sp
4513 +# define PL_statcache statcache
4514 +# define PL_stdingv stdingv
4515 +# define PL_sv_arenaroot sv_arenaroot
4516 +# define PL_sv_no sv_no
4517 +# define PL_sv_undef sv_undef
4518 +# define PL_sv_yes sv_yes
4519 +# define PL_tainted tainted
4520 +# define PL_tainting tainting
4521 +# define PL_tokenbuf tokenbuf
4525 +/* Warning: PL_parser
4526 + * For perl versions earlier than 5.9.5, this is an always
4527 + * non-NULL dummy. Also, it cannot be dereferenced. Don't
4528 + * use it if you can avoid is and unless you absolutely know
4529 + * what you're doing.
4530 + * If you always check that PL_parser is non-NULL, you can
4531 + * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
4532 + * a dummy parser structure.
4535 +#if (PERL_BCDVERSION >= 0x5009005)
4536 +# ifdef DPPP_PL_parser_NO_DUMMY
4537 +# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4538 + (croak("panic: PL_parser == NULL in %s:%d", \
4539 + __FILE__, __LINE__), (yy_parser *) NULL))->var)
4541 +# ifdef DPPP_PL_parser_NO_DUMMY_WARNING
4542 +# define D_PPP_parser_dummy_warning(var)
4544 +# define D_PPP_parser_dummy_warning(var) \
4545 + warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
4547 +# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4548 + (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
4549 +#if defined(NEED_PL_parser)
4550 +static yy_parser DPPP_(dummy_PL_parser);
4551 +#elif defined(NEED_PL_parser_GLOBAL)
4552 +yy_parser DPPP_(dummy_PL_parser);
4554 +extern yy_parser DPPP_(dummy_PL_parser);
4559 +/* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */
4560 +/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
4561 + * Do not use this variable unless you know exactly what you're
4562 + * doint. It is internal to the perl parser and may change or even
4563 + * be removed in the future. As of perl 5.9.5, you have to check
4564 + * for (PL_parser != NULL) for this variable to have any effect.
4565 + * An always non-NULL PL_parser dummy is provided for earlier
4567 + * If PL_parser is NULL when you try to access this variable, a
4568 + * dummy is being accessed instead and a warning is issued unless
4569 + * you define DPPP_PL_parser_NO_DUMMY_WARNING.
4570 + * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
4571 + * this variable will croak with a panic message.
4574 +# define PL_expect D_PPP_my_PL_parser_var(expect)
4575 +# define PL_copline D_PPP_my_PL_parser_var(copline)
4576 +# define PL_rsfp D_PPP_my_PL_parser_var(rsfp)
4577 +# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters)
4578 +# define PL_linestr D_PPP_my_PL_parser_var(linestr)
4579 +# define PL_bufptr D_PPP_my_PL_parser_var(bufptr)
4580 +# define PL_bufend D_PPP_my_PL_parser_var(bufend)
4581 +# define PL_lex_state D_PPP_my_PL_parser_var(lex_state)
4582 +# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff)
4583 +# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf)
4584 +# define PL_in_my D_PPP_my_PL_parser_var(in_my)
4585 +# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash)
4586 +# define PL_error_count D_PPP_my_PL_parser_var(error_count)
4591 +/* ensure that PL_parser != NULL and cannot be dereferenced */
4592 +# define PL_parser ((void *) 1)
4596 +# define mPUSHs(s) PUSHs(sv_2mortal(s))
4600 +# define PUSHmortal PUSHs(sv_newmortal())
4604 +# define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
4608 +# define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
4612 +# define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
4616 +# define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
4619 +# define mXPUSHs(s) XPUSHs(sv_2mortal(s))
4622 +#ifndef XPUSHmortal
4623 +# define XPUSHmortal XPUSHs(sv_newmortal())
4627 +# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
4631 +# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
4635 +# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
4639 +# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
4644 +# define call_sv perl_call_sv
4648 +# define call_pv perl_call_pv
4652 +# define call_argv perl_call_argv
4655 +#ifndef call_method
4656 +# define call_method perl_call_method
4659 +# define eval_sv perl_eval_sv
4663 +#ifndef PERL_LOADMOD_DENY
4664 +# define PERL_LOADMOD_DENY 0x1
4667 +#ifndef PERL_LOADMOD_NOIMPORT
4668 +# define PERL_LOADMOD_NOIMPORT 0x2
4671 +#ifndef PERL_LOADMOD_IMPORT_OPS
4672 +# define PERL_LOADMOD_IMPORT_OPS 0x4
4676 +# define G_METHOD 64
4680 +# if (PERL_BCDVERSION < 0x5006000)
4681 +# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
4682 + (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
4684 +# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
4685 + (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
4689 +/* Replace perl_eval_pv with eval_pv */
4692 +#if defined(NEED_eval_pv)
4693 +static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4696 +extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4702 +#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
4703 +#define Perl_eval_pv DPPP_(my_eval_pv)
4705 +#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
4708 +DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
4711 + SV* sv = newSVpv(p, 0);
4714 + eval_sv(sv, G_SCALAR);
4721 + if (croak_on_error && SvTRUE(GvSV(errgv)))
4722 + croak(SvPVx(GvSV(errgv), na));
4730 +#ifndef vload_module
4731 +#if defined(NEED_vload_module)
4732 +static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4735 +extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4738 +#ifdef vload_module
4739 +# undef vload_module
4741 +#define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
4742 +#define Perl_vload_module DPPP_(my_vload_module)
4744 +#if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
4747 +DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
4753 + OP * const modname = newSVOP(OP_CONST, 0, name);
4754 + /* 5.005 has a somewhat hacky force_normal that doesn't croak on
4755 + SvREADONLY() if PL_compling is true. Current perls take care in
4756 + ck_require() to correctly turn off SvREADONLY before calling
4757 + force_normal_flags(). This seems a better fix than fudging PL_compling
4759 + SvREADONLY_off(((SVOP*)modname)->op_sv);
4760 + modname->op_private |= OPpCONST_BARE;
4762 + veop = newSVOP(OP_CONST, 0, ver);
4766 + if (flags & PERL_LOADMOD_NOIMPORT) {
4767 + imop = sawparens(newNULLLIST());
4769 + else if (flags & PERL_LOADMOD_IMPORT_OPS) {
4770 + imop = va_arg(*args, OP*);
4775 + sv = va_arg(*args, SV*);
4777 + imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
4778 + sv = va_arg(*args, SV*);
4782 + const line_t ocopline = PL_copline;
4783 + COP * const ocurcop = PL_curcop;
4784 + const int oexpect = PL_expect;
4786 +#if (PERL_BCDVERSION >= 0x5004000)
4787 + utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
4788 + veop, modname, imop);
4790 + utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
4793 + PL_expect = oexpect;
4794 + PL_copline = ocopline;
4795 + PL_curcop = ocurcop;
4802 +#ifndef load_module
4803 +#if defined(NEED_load_module)
4804 +static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
4807 +extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
4811 +# undef load_module
4813 +#define load_module DPPP_(my_load_module)
4814 +#define Perl_load_module DPPP_(my_load_module)
4816 +#if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
4819 +DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
4822 + va_start(args, ver);
4823 + vload_module(flags, name, ver, &args);
4830 +# define newRV_inc(sv) newRV(sv) /* Replace */
4833 +#ifndef newRV_noinc
4834 +#if defined(NEED_newRV_noinc)
4835 +static SV * DPPP_(my_newRV_noinc)(SV *sv);
4838 +extern SV * DPPP_(my_newRV_noinc)(SV *sv);
4842 +# undef newRV_noinc
4844 +#define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
4845 +#define Perl_newRV_noinc DPPP_(my_newRV_noinc)
4847 +#if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
4849 +DPPP_(my_newRV_noinc)(SV *sv)
4851 + SV *rv = (SV *)newRV(sv);
4858 +/* Hint: newCONSTSUB
4859 + * Returns a CV* as of perl-5.7.1. This return value is not supported
4860 + * by Devel::PPPort.
4863 +/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
4864 +#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
4865 +#if defined(NEED_newCONSTSUB)
4866 +static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
4869 +extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
4873 +# undef newCONSTSUB
4875 +#define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
4876 +#define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
4878 +#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
4880 +/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
4881 +/* (There's no PL_parser in perl < 5.005, so this is completely safe) */
4882 +#define D_PPP_PL_copline PL_copline
4885 +DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
4887 + U32 oldhints = PL_hints;
4888 + HV *old_cop_stash = PL_curcop->cop_stash;
4889 + HV *old_curstash = PL_curstash;
4890 + line_t oldline = PL_curcop->cop_line;
4891 + PL_curcop->cop_line = D_PPP_PL_copline;
4893 + PL_hints &= ~HINT_BLOCK_SCOPE;
4895 + PL_curstash = PL_curcop->cop_stash = stash;
4899 +#if (PERL_BCDVERSION < 0x5003022)
4901 +#elif (PERL_BCDVERSION == 0x5003022)
4902 + start_subparse(0),
4903 +#else /* 5.003_23 onwards */
4904 + start_subparse(FALSE, 0),
4907 + newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
4908 + newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
4909 + newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
4912 + PL_hints = oldhints;
4913 + PL_curcop->cop_stash = old_cop_stash;
4914 + PL_curstash = old_curstash;
4915 + PL_curcop->cop_line = oldline;
4921 + * Boilerplate macros for initializing and accessing interpreter-local
4922 + * data from C. All statics in extensions should be reworked to use
4923 + * this, if you want to make the extension thread-safe. See ext/re/re.xs
4924 + * for an example of the use of these macros.
4926 + * Code that uses these macros is responsible for the following:
4927 + * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
4928 + * 2. Declare a typedef named my_cxt_t that is a structure that contains
4929 + * all the data that needs to be interpreter-local.
4930 + * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
4931 + * 4. Use the MY_CXT_INIT macro such that it is called exactly once
4932 + * (typically put in the BOOT: section).
4933 + * 5. Use the members of the my_cxt_t structure everywhere as
4935 + * 6. Use the dMY_CXT macro (a declaration) in all the functions that
4939 +#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
4940 + defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
4942 +#ifndef START_MY_CXT
4944 +/* This must appear in all extensions that define a my_cxt_t structure,
4945 + * right after the definition (i.e. at file scope). The non-threads
4946 + * case below uses it to declare the data as static. */
4947 +#define START_MY_CXT
4949 +#if (PERL_BCDVERSION < 0x5004068)
4950 +/* Fetches the SV that keeps the per-interpreter data. */
4951 +#define dMY_CXT_SV \
4952 + SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
4953 +#else /* >= perl5.004_68 */
4954 +#define dMY_CXT_SV \
4955 + SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
4956 + sizeof(MY_CXT_KEY)-1, TRUE)
4957 +#endif /* < perl5.004_68 */
4959 +/* This declaration should be used within all functions that use the
4960 + * interpreter-local data. */
4963 + my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
4965 +/* Creates and zeroes the per-interpreter data.
4966 + * (We allocate my_cxtp in a Perl SV so that it will be released when
4967 + * the interpreter goes away.) */
4968 +#define MY_CXT_INIT \
4970 + /* newSV() allocates one more than needed */ \
4971 + my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
4972 + Zero(my_cxtp, 1, my_cxt_t); \
4973 + sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
4975 +/* This macro must be used to access members of the my_cxt_t structure.
4976 + * e.g. MYCXT.some_data */
4977 +#define MY_CXT (*my_cxtp)
4979 +/* Judicious use of these macros can reduce the number of times dMY_CXT
4980 + * is used. Use is similar to pTHX, aTHX etc. */
4981 +#define pMY_CXT my_cxt_t *my_cxtp
4982 +#define pMY_CXT_ pMY_CXT,
4983 +#define _pMY_CXT ,pMY_CXT
4984 +#define aMY_CXT my_cxtp
4985 +#define aMY_CXT_ aMY_CXT,
4986 +#define _aMY_CXT ,aMY_CXT
4988 +#endif /* START_MY_CXT */
4990 +#ifndef MY_CXT_CLONE
4991 +/* Clones the per-interpreter data. */
4992 +#define MY_CXT_CLONE \
4994 + my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
4995 + Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
4996 + sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
4999 +#else /* single interpreter */
5001 +#ifndef START_MY_CXT
5003 +#define START_MY_CXT static my_cxt_t my_cxt;
5004 +#define dMY_CXT_SV dNOOP
5005 +#define dMY_CXT dNOOP
5006 +#define MY_CXT_INIT NOOP
5007 +#define MY_CXT my_cxt
5009 +#define pMY_CXT void
5016 +#endif /* START_MY_CXT */
5018 +#ifndef MY_CXT_CLONE
5019 +#define MY_CXT_CLONE NOOP
5025 +# if IVSIZE == LONGSIZE
5031 +# elif IVSIZE == INTSIZE
5038 +# error "cannot define IV/UV formats"
5043 +# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
5044 + defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
5045 + /* Not very likely, but let's try anyway. */
5046 +# define NVef PERL_PRIeldbl
5047 +# define NVff PERL_PRIfldbl
5048 +# define NVgf PERL_PRIgldbl
5056 +#ifndef SvREFCNT_inc
5057 +# ifdef PERL_USE_GCC_BRACE_GROUPS
5058 +# define SvREFCNT_inc(sv) \
5060 + SV * const _sv = (SV*)(sv); \
5062 + (SvREFCNT(_sv))++; \
5066 +# define SvREFCNT_inc(sv) \
5067 + ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
5071 +#ifndef SvREFCNT_inc_simple
5072 +# ifdef PERL_USE_GCC_BRACE_GROUPS
5073 +# define SvREFCNT_inc_simple(sv) \
5076 + (SvREFCNT(sv))++; \
5080 +# define SvREFCNT_inc_simple(sv) \
5081 + ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
5085 +#ifndef SvREFCNT_inc_NN
5086 +# ifdef PERL_USE_GCC_BRACE_GROUPS
5087 +# define SvREFCNT_inc_NN(sv) \
5089 + SV * const _sv = (SV*)(sv); \
5090 + SvREFCNT(_sv)++; \
5094 +# define SvREFCNT_inc_NN(sv) \
5095 + (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
5099 +#ifndef SvREFCNT_inc_void
5100 +# ifdef PERL_USE_GCC_BRACE_GROUPS
5101 +# define SvREFCNT_inc_void(sv) \
5103 + SV * const _sv = (SV*)(sv); \
5105 + (void)(SvREFCNT(_sv)++); \
5108 +# define SvREFCNT_inc_void(sv) \
5109 + (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
5112 +#ifndef SvREFCNT_inc_simple_void
5113 +# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
5116 +#ifndef SvREFCNT_inc_simple_NN
5117 +# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
5120 +#ifndef SvREFCNT_inc_void_NN
5121 +# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5124 +#ifndef SvREFCNT_inc_simple_void_NN
5125 +# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5130 +#if defined(NEED_newSV_type)
5131 +static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5134 +extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5140 +#define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a)
5141 +#define Perl_newSV_type DPPP_(my_newSV_type)
5143 +#if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL)
5146 +DPPP_(my_newSV_type)(pTHX_ svtype const t)
5148 + SV* const sv = newSV(0);
5149 + sv_upgrade(sv, t);
5157 +#if (PERL_BCDVERSION < 0x5006000)
5158 +# define D_PPP_CONSTPV_ARG(x) ((char *) (x))
5160 +# define D_PPP_CONSTPV_ARG(x) (x)
5163 +# define newSVpvn(data,len) ((data) \
5164 + ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
5167 +#ifndef newSVpvn_utf8
5168 +# define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
5171 +# define SVf_UTF8 0
5174 +#ifndef newSVpvn_flags
5176 +#if defined(NEED_newSVpvn_flags)
5177 +static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5180 +extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5183 +#ifdef newSVpvn_flags
5184 +# undef newSVpvn_flags
5186 +#define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c)
5187 +#define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags)
5189 +#if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL)
5192 +DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags)
5194 + SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
5195 + SvFLAGS(sv) |= (flags & SVf_UTF8);
5196 + return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
5203 +/* Backwards compatibility stuff... :-( */
5204 +#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
5205 +# define NEED_sv_2pv_flags
5207 +#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
5208 +# define NEED_sv_2pv_flags_GLOBAL
5211 +/* Hint: sv_2pv_nolen
5212 + * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
5214 +#ifndef sv_2pv_nolen
5215 +# define sv_2pv_nolen(sv) SvPV_nolen(sv)
5221 + * Does not work in perl-5.6.1, ppport.h implements a version
5222 + * borrowed from perl-5.7.3.
5225 +#if (PERL_BCDVERSION < 0x5007000)
5227 +#if defined(NEED_sv_2pvbyte)
5228 +static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5231 +extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5237 +#define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
5238 +#define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
5240 +#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
5243 +DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp)
5245 + sv_utf8_downgrade(sv,0);
5246 + return SvPV(sv,*lp);
5251 +/* Hint: sv_2pvbyte
5252 + * Use the SvPVbyte() macro instead of sv_2pvbyte().
5257 +#define SvPVbyte(sv, lp) \
5258 + ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
5259 + ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
5265 +# define SvPVbyte SvPV
5266 +# define sv_2pvbyte sv_2pv
5269 +#ifndef sv_2pvbyte_nolen
5270 +# define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv)
5274 + * Always use the SvPV() macro instead of sv_pvn().
5277 +/* Hint: sv_pvn_force
5278 + * Always use the SvPV_force() macro instead of sv_pvn_force().
5281 +/* If these are undefined, they're not handled by the core anyway */
5282 +#ifndef SV_IMMEDIATE_UNREF
5283 +# define SV_IMMEDIATE_UNREF 0
5287 +# define SV_GMAGIC 0
5290 +#ifndef SV_COW_DROP_PV
5291 +# define SV_COW_DROP_PV 0
5294 +#ifndef SV_UTF8_NO_ENCODING
5295 +# define SV_UTF8_NO_ENCODING 0
5299 +# define SV_NOSTEAL 0
5302 +#ifndef SV_CONST_RETURN
5303 +# define SV_CONST_RETURN 0
5306 +#ifndef SV_MUTABLE_RETURN
5307 +# define SV_MUTABLE_RETURN 0
5311 +# define SV_SMAGIC 0
5314 +#ifndef SV_HAS_TRAILING_NUL
5315 +# define SV_HAS_TRAILING_NUL 0
5318 +#ifndef SV_COW_SHARED_HASH_KEYS
5319 +# define SV_COW_SHARED_HASH_KEYS 0
5322 +#if (PERL_BCDVERSION < 0x5007002)
5324 +#if defined(NEED_sv_2pv_flags)
5325 +static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5328 +extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5331 +#ifdef sv_2pv_flags
5332 +# undef sv_2pv_flags
5334 +#define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c)
5335 +#define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags)
5337 +#if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL)
5340 +DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5342 + STRLEN n_a = (STRLEN) flags;
5343 + return sv_2pv(sv, lp ? lp : &n_a);
5348 +#if defined(NEED_sv_pvn_force_flags)
5349 +static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5352 +extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5355 +#ifdef sv_pvn_force_flags
5356 +# undef sv_pvn_force_flags
5358 +#define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c)
5359 +#define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags)
5361 +#if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL)
5364 +DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5366 + STRLEN n_a = (STRLEN) flags;
5367 + return sv_pvn_force(sv, lp ? lp : &n_a);
5374 +#if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
5375 +# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
5377 +# define DPPP_SVPV_NOLEN_LP_ARG 0
5380 +# define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC)
5383 +#ifndef SvPV_mutable
5384 +# define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC)
5387 +# define SvPV_flags(sv, lp, flags) \
5388 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5389 + ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
5391 +#ifndef SvPV_flags_const
5392 +# define SvPV_flags_const(sv, lp, flags) \
5393 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5394 + ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
5395 + (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
5397 +#ifndef SvPV_flags_const_nolen
5398 +# define SvPV_flags_const_nolen(sv, flags) \
5399 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5400 + ? SvPVX_const(sv) : \
5401 + (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
5403 +#ifndef SvPV_flags_mutable
5404 +# define SvPV_flags_mutable(sv, lp, flags) \
5405 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5406 + ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
5407 + sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5410 +# define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC)
5413 +#ifndef SvPV_force_nolen
5414 +# define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC)
5417 +#ifndef SvPV_force_mutable
5418 +# define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
5421 +#ifndef SvPV_force_nomg
5422 +# define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0)
5425 +#ifndef SvPV_force_nomg_nolen
5426 +# define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0)
5428 +#ifndef SvPV_force_flags
5429 +# define SvPV_force_flags(sv, lp, flags) \
5430 + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5431 + ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
5433 +#ifndef SvPV_force_flags_nolen
5434 +# define SvPV_force_flags_nolen(sv, flags) \
5435 + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5436 + ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
5438 +#ifndef SvPV_force_flags_mutable
5439 +# define SvPV_force_flags_mutable(sv, lp, flags) \
5440 + ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5441 + ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
5442 + : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5445 +# define SvPV_nolen(sv) \
5446 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5447 + ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
5449 +#ifndef SvPV_nolen_const
5450 +# define SvPV_nolen_const(sv) \
5451 + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5452 + ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
5455 +# define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
5458 +#ifndef SvPV_nomg_const
5459 +# define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
5462 +#ifndef SvPV_nomg_const_nolen
5463 +# define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0)
5466 +#ifndef SvPV_nomg_nolen
5467 +# define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5468 + ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0))
5471 +# define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \
5472 + SvPV_set((sv), (char *) saferealloc( \
5473 + (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
5476 +#ifndef SvMAGIC_set
5477 +# define SvMAGIC_set(sv, val) \
5478 + STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5479 + (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
5482 +#if (PERL_BCDVERSION < 0x5009003)
5483 +#ifndef SvPVX_const
5484 +# define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv)))
5487 +#ifndef SvPVX_mutable
5488 +# define SvPVX_mutable(sv) (0 + SvPVX(sv))
5491 +# define SvRV_set(sv, val) \
5492 + STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5493 + (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
5497 +#ifndef SvPVX_const
5498 +# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv))
5501 +#ifndef SvPVX_mutable
5502 +# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv)
5505 +# define SvRV_set(sv, val) \
5506 + STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5507 + ((sv)->sv_u.svu_rv = (val)); } STMT_END
5511 +#ifndef SvSTASH_set
5512 +# define SvSTASH_set(sv, val) \
5513 + STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5514 + (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
5517 +#if (PERL_BCDVERSION < 0x5004000)
5519 +# define SvUV_set(sv, val) \
5520 + STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5521 + (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
5526 +# define SvUV_set(sv, val) \
5527 + STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5528 + (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
5533 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
5534 +#if defined(NEED_vnewSVpvf)
5535 +static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5538 +extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5544 +#define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
5545 +#define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
5547 +#if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
5550 +DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
5552 + register SV *sv = newSV(0);
5553 + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
5560 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
5561 +# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5564 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
5565 +# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5568 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
5569 +#if defined(NEED_sv_catpvf_mg)
5570 +static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5573 +extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5576 +#define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
5578 +#if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
5581 +DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5584 + va_start(args, pat);
5585 + sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5593 +#ifdef PERL_IMPLICIT_CONTEXT
5594 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
5595 +#if defined(NEED_sv_catpvf_mg_nocontext)
5596 +static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5599 +extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5602 +#define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5603 +#define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5605 +#if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
5608 +DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5612 + va_start(args, pat);
5613 + sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5622 +/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
5623 +#ifndef sv_catpvf_mg
5624 +# ifdef PERL_IMPLICIT_CONTEXT
5625 +# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
5627 +# define sv_catpvf_mg Perl_sv_catpvf_mg
5631 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
5632 +# define sv_vcatpvf_mg(sv, pat, args) \
5634 + sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5639 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
5640 +#if defined(NEED_sv_setpvf_mg)
5641 +static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5644 +extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5647 +#define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
5649 +#if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
5652 +DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5655 + va_start(args, pat);
5656 + sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5664 +#ifdef PERL_IMPLICIT_CONTEXT
5665 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
5666 +#if defined(NEED_sv_setpvf_mg_nocontext)
5667 +static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5670 +extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5673 +#define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5674 +#define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5676 +#if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
5679 +DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5683 + va_start(args, pat);
5684 + sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5693 +/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
5694 +#ifndef sv_setpvf_mg
5695 +# ifdef PERL_IMPLICIT_CONTEXT
5696 +# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
5698 +# define sv_setpvf_mg Perl_sv_setpvf_mg
5702 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
5703 +# define sv_vsetpvf_mg(sv, pat, args) \
5705 + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5710 +/* Hint: newSVpvn_share
5711 + * The SVs created by this function only mimic the behaviour of
5712 + * shared PVs without really being shared. Only use if you know
5713 + * what you're doing.
5716 +#ifndef newSVpvn_share
5718 +#if defined(NEED_newSVpvn_share)
5719 +static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5722 +extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5725 +#ifdef newSVpvn_share
5726 +# undef newSVpvn_share
5728 +#define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
5729 +#define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
5731 +#if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
5734 +DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash)
5740 + PERL_HASH(hash, (char*) src, len);
5741 + sv = newSVpvn((char *) src, len);
5742 + sv_upgrade(sv, SVt_PVIV);
5744 + SvREADONLY_on(sv);
5752 +#ifndef SvSHARED_HASH
5753 +# define SvSHARED_HASH(sv) (0 + SvUVX(sv))
5756 +# define HvNAME_get(hv) HvNAME(hv)
5758 +#ifndef HvNAMELEN_get
5759 +# define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
5762 +# define GvSVn(gv) GvSV(gv)
5765 +#ifndef isGV_with_GP
5766 +# define isGV_with_GP(gv) isGV(gv)
5769 +#ifndef gv_fetchpvn_flags
5770 +# define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt)
5774 +# define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt)
5776 +#ifndef get_cvn_flags
5777 +# define get_cvn_flags(name, namelen, flags) get_cv(name, flags)
5780 +# define WARN_ALL 0
5783 +#ifndef WARN_CLOSURE
5784 +# define WARN_CLOSURE 1
5787 +#ifndef WARN_DEPRECATED
5788 +# define WARN_DEPRECATED 2
5791 +#ifndef WARN_EXITING
5792 +# define WARN_EXITING 3
5796 +# define WARN_GLOB 4
5803 +#ifndef WARN_CLOSED
5804 +# define WARN_CLOSED 6
5808 +# define WARN_EXEC 7
5812 +# define WARN_LAYER 8
5815 +#ifndef WARN_NEWLINE
5816 +# define WARN_NEWLINE 9
5820 +# define WARN_PIPE 10
5823 +#ifndef WARN_UNOPENED
5824 +# define WARN_UNOPENED 11
5828 +# define WARN_MISC 12
5831 +#ifndef WARN_NUMERIC
5832 +# define WARN_NUMERIC 13
5836 +# define WARN_ONCE 14
5839 +#ifndef WARN_OVERFLOW
5840 +# define WARN_OVERFLOW 15
5844 +# define WARN_PACK 16
5847 +#ifndef WARN_PORTABLE
5848 +# define WARN_PORTABLE 17
5851 +#ifndef WARN_RECURSION
5852 +# define WARN_RECURSION 18
5855 +#ifndef WARN_REDEFINE
5856 +# define WARN_REDEFINE 19
5859 +#ifndef WARN_REGEXP
5860 +# define WARN_REGEXP 20
5863 +#ifndef WARN_SEVERE
5864 +# define WARN_SEVERE 21
5867 +#ifndef WARN_DEBUGGING
5868 +# define WARN_DEBUGGING 22
5871 +#ifndef WARN_INPLACE
5872 +# define WARN_INPLACE 23
5875 +#ifndef WARN_INTERNAL
5876 +# define WARN_INTERNAL 24
5879 +#ifndef WARN_MALLOC
5880 +# define WARN_MALLOC 25
5883 +#ifndef WARN_SIGNAL
5884 +# define WARN_SIGNAL 26
5887 +#ifndef WARN_SUBSTR
5888 +# define WARN_SUBSTR 27
5891 +#ifndef WARN_SYNTAX
5892 +# define WARN_SYNTAX 28
5895 +#ifndef WARN_AMBIGUOUS
5896 +# define WARN_AMBIGUOUS 29
5899 +#ifndef WARN_BAREWORD
5900 +# define WARN_BAREWORD 30
5904 +# define WARN_DIGIT 31
5907 +#ifndef WARN_PARENTHESIS
5908 +# define WARN_PARENTHESIS 32
5911 +#ifndef WARN_PRECEDENCE
5912 +# define WARN_PRECEDENCE 33
5915 +#ifndef WARN_PRINTF
5916 +# define WARN_PRINTF 34
5919 +#ifndef WARN_PROTOTYPE
5920 +# define WARN_PROTOTYPE 35
5924 +# define WARN_QW 36
5927 +#ifndef WARN_RESERVED
5928 +# define WARN_RESERVED 37
5931 +#ifndef WARN_SEMICOLON
5932 +# define WARN_SEMICOLON 38
5936 +# define WARN_TAINT 39
5939 +#ifndef WARN_THREADS
5940 +# define WARN_THREADS 40
5943 +#ifndef WARN_UNINITIALIZED
5944 +# define WARN_UNINITIALIZED 41
5947 +#ifndef WARN_UNPACK
5948 +# define WARN_UNPACK 42
5952 +# define WARN_UNTIE 43
5956 +# define WARN_UTF8 44
5960 +# define WARN_VOID 45
5963 +#ifndef WARN_ASSERTIONS
5964 +# define WARN_ASSERTIONS 46
5967 +# define packWARN(a) (a)
5972 +# define ckWARN(a) (PL_dowarn & G_WARN_ON)
5974 +# define ckWARN(a) PL_dowarn
5978 +#if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
5979 +#if defined(NEED_warner)
5980 +static void DPPP_(my_warner)(U32 err, const char *pat, ...);
5983 +extern void DPPP_(my_warner)(U32 err, const char *pat, ...);
5986 +#define Perl_warner DPPP_(my_warner)
5988 +#if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
5991 +DPPP_(my_warner)(U32 err, const char *pat, ...)
5996 + PERL_UNUSED_ARG(err);
5998 + va_start(args, pat);
5999 + sv = vnewSVpvf(pat, &args);
6002 + warn("%s", SvPV_nolen(sv));
6005 +#define warner Perl_warner
6007 +#define Perl_warner_nocontext Perl_warner
6012 +/* concatenating with "" ensures that only literal strings are accepted as argument
6013 + * note that STR_WITH_LEN() can't be used as argument to macros or functions that
6014 + * under some configurations might be macros
6016 +#ifndef STR_WITH_LEN
6017 +# define STR_WITH_LEN(s) (s ""), (sizeof(s)-1)
6020 +# define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1)
6023 +#ifndef newSVpvs_flags
6024 +# define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags)
6027 +#ifndef newSVpvs_share
6028 +# define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0)
6032 +# define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1)
6036 +# define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1)
6040 +# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
6044 +# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0)
6046 +#ifndef gv_fetchpvs
6047 +# define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
6050 +#ifndef gv_stashpvs
6051 +# define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags)
6054 +# define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags)
6057 +# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
6059 +#ifndef PERL_MAGIC_sv
6060 +# define PERL_MAGIC_sv '\0'
6063 +#ifndef PERL_MAGIC_overload
6064 +# define PERL_MAGIC_overload 'A'
6067 +#ifndef PERL_MAGIC_overload_elem
6068 +# define PERL_MAGIC_overload_elem 'a'
6071 +#ifndef PERL_MAGIC_overload_table
6072 +# define PERL_MAGIC_overload_table 'c'
6075 +#ifndef PERL_MAGIC_bm
6076 +# define PERL_MAGIC_bm 'B'
6079 +#ifndef PERL_MAGIC_regdata
6080 +# define PERL_MAGIC_regdata 'D'
6083 +#ifndef PERL_MAGIC_regdatum
6084 +# define PERL_MAGIC_regdatum 'd'
6087 +#ifndef PERL_MAGIC_env
6088 +# define PERL_MAGIC_env 'E'
6091 +#ifndef PERL_MAGIC_envelem
6092 +# define PERL_MAGIC_envelem 'e'
6095 +#ifndef PERL_MAGIC_fm
6096 +# define PERL_MAGIC_fm 'f'
6099 +#ifndef PERL_MAGIC_regex_global
6100 +# define PERL_MAGIC_regex_global 'g'
6103 +#ifndef PERL_MAGIC_isa
6104 +# define PERL_MAGIC_isa 'I'
6107 +#ifndef PERL_MAGIC_isaelem
6108 +# define PERL_MAGIC_isaelem 'i'
6111 +#ifndef PERL_MAGIC_nkeys
6112 +# define PERL_MAGIC_nkeys 'k'
6115 +#ifndef PERL_MAGIC_dbfile
6116 +# define PERL_MAGIC_dbfile 'L'
6119 +#ifndef PERL_MAGIC_dbline
6120 +# define PERL_MAGIC_dbline 'l'
6123 +#ifndef PERL_MAGIC_mutex
6124 +# define PERL_MAGIC_mutex 'm'
6127 +#ifndef PERL_MAGIC_shared
6128 +# define PERL_MAGIC_shared 'N'
6131 +#ifndef PERL_MAGIC_shared_scalar
6132 +# define PERL_MAGIC_shared_scalar 'n'
6135 +#ifndef PERL_MAGIC_collxfrm
6136 +# define PERL_MAGIC_collxfrm 'o'
6139 +#ifndef PERL_MAGIC_tied
6140 +# define PERL_MAGIC_tied 'P'
6143 +#ifndef PERL_MAGIC_tiedelem
6144 +# define PERL_MAGIC_tiedelem 'p'
6147 +#ifndef PERL_MAGIC_tiedscalar
6148 +# define PERL_MAGIC_tiedscalar 'q'
6151 +#ifndef PERL_MAGIC_qr
6152 +# define PERL_MAGIC_qr 'r'
6155 +#ifndef PERL_MAGIC_sig
6156 +# define PERL_MAGIC_sig 'S'
6159 +#ifndef PERL_MAGIC_sigelem
6160 +# define PERL_MAGIC_sigelem 's'
6163 +#ifndef PERL_MAGIC_taint
6164 +# define PERL_MAGIC_taint 't'
6167 +#ifndef PERL_MAGIC_uvar
6168 +# define PERL_MAGIC_uvar 'U'
6171 +#ifndef PERL_MAGIC_uvar_elem
6172 +# define PERL_MAGIC_uvar_elem 'u'
6175 +#ifndef PERL_MAGIC_vstring
6176 +# define PERL_MAGIC_vstring 'V'
6179 +#ifndef PERL_MAGIC_vec
6180 +# define PERL_MAGIC_vec 'v'
6183 +#ifndef PERL_MAGIC_utf8
6184 +# define PERL_MAGIC_utf8 'w'
6187 +#ifndef PERL_MAGIC_substr
6188 +# define PERL_MAGIC_substr 'x'
6191 +#ifndef PERL_MAGIC_defelem
6192 +# define PERL_MAGIC_defelem 'y'
6195 +#ifndef PERL_MAGIC_glob
6196 +# define PERL_MAGIC_glob '*'
6199 +#ifndef PERL_MAGIC_arylen
6200 +# define PERL_MAGIC_arylen '#'
6203 +#ifndef PERL_MAGIC_pos
6204 +# define PERL_MAGIC_pos '.'
6207 +#ifndef PERL_MAGIC_backref
6208 +# define PERL_MAGIC_backref '<'
6211 +#ifndef PERL_MAGIC_ext
6212 +# define PERL_MAGIC_ext '~'
6215 +/* That's the best we can do... */
6216 +#ifndef sv_catpvn_nomg
6217 +# define sv_catpvn_nomg sv_catpvn
6220 +#ifndef sv_catsv_nomg
6221 +# define sv_catsv_nomg sv_catsv
6224 +#ifndef sv_setsv_nomg
6225 +# define sv_setsv_nomg sv_setsv
6228 +#ifndef sv_pvn_nomg
6229 +# define sv_pvn_nomg sv_pvn
6233 +# define SvIV_nomg SvIV
6237 +# define SvUV_nomg SvUV
6240 +#ifndef sv_catpv_mg
6241 +# define sv_catpv_mg(sv, ptr) \
6243 + SV *TeMpSv = sv; \
6244 + sv_catpv(TeMpSv,ptr); \
6245 + SvSETMAGIC(TeMpSv); \
6249 +#ifndef sv_catpvn_mg
6250 +# define sv_catpvn_mg(sv, ptr, len) \
6252 + SV *TeMpSv = sv; \
6253 + sv_catpvn(TeMpSv,ptr,len); \
6254 + SvSETMAGIC(TeMpSv); \
6258 +#ifndef sv_catsv_mg
6259 +# define sv_catsv_mg(dsv, ssv) \
6261 + SV *TeMpSv = dsv; \
6262 + sv_catsv(TeMpSv,ssv); \
6263 + SvSETMAGIC(TeMpSv); \
6267 +#ifndef sv_setiv_mg
6268 +# define sv_setiv_mg(sv, i) \
6270 + SV *TeMpSv = sv; \
6271 + sv_setiv(TeMpSv,i); \
6272 + SvSETMAGIC(TeMpSv); \
6276 +#ifndef sv_setnv_mg
6277 +# define sv_setnv_mg(sv, num) \
6279 + SV *TeMpSv = sv; \
6280 + sv_setnv(TeMpSv,num); \
6281 + SvSETMAGIC(TeMpSv); \
6285 +#ifndef sv_setpv_mg
6286 +# define sv_setpv_mg(sv, ptr) \
6288 + SV *TeMpSv = sv; \
6289 + sv_setpv(TeMpSv,ptr); \
6290 + SvSETMAGIC(TeMpSv); \
6294 +#ifndef sv_setpvn_mg
6295 +# define sv_setpvn_mg(sv, ptr, len) \
6297 + SV *TeMpSv = sv; \
6298 + sv_setpvn(TeMpSv,ptr,len); \
6299 + SvSETMAGIC(TeMpSv); \
6303 +#ifndef sv_setsv_mg
6304 +# define sv_setsv_mg(dsv, ssv) \
6306 + SV *TeMpSv = dsv; \
6307 + sv_setsv(TeMpSv,ssv); \
6308 + SvSETMAGIC(TeMpSv); \
6312 +#ifndef sv_setuv_mg
6313 +# define sv_setuv_mg(sv, i) \
6315 + SV *TeMpSv = sv; \
6316 + sv_setuv(TeMpSv,i); \
6317 + SvSETMAGIC(TeMpSv); \
6321 +#ifndef sv_usepvn_mg
6322 +# define sv_usepvn_mg(sv, ptr, len) \
6324 + SV *TeMpSv = sv; \
6325 + sv_usepvn(TeMpSv,ptr,len); \
6326 + SvSETMAGIC(TeMpSv); \
6329 +#ifndef SvVSTRING_mg
6330 +# define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
6333 +/* Hint: sv_magic_portable
6334 + * This is a compatibility function that is only available with
6335 + * Devel::PPPort. It is NOT in the perl core.
6336 + * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
6337 + * it is being passed a name pointer with namlen == 0. In that
6338 + * case, perl 5.8.0 and later store the pointer, not a copy of it.
6339 + * The compatibility can be provided back to perl 5.004. With
6340 + * earlier versions, the code will not compile.
6343 +#if (PERL_BCDVERSION < 0x5004000)
6345 + /* code that uses sv_magic_portable will not compile */
6347 +#elif (PERL_BCDVERSION < 0x5008000)
6349 +# define sv_magic_portable(sv, obj, how, name, namlen) \
6351 + SV *SvMp_sv = (sv); \
6352 + char *SvMp_name = (char *) (name); \
6353 + I32 SvMp_namlen = (namlen); \
6354 + if (SvMp_name && SvMp_namlen == 0) \
6357 + sv_magic(SvMp_sv, obj, how, 0, 0); \
6358 + mg = SvMAGIC(SvMp_sv); \
6359 + mg->mg_len = -42; /* XXX: this is the tricky part */ \
6360 + mg->mg_ptr = SvMp_name; \
6364 + sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
6370 +# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e)
6374 +#ifdef USE_ITHREADS
6376 +# define CopFILE(c) ((c)->cop_file)
6380 +# define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
6383 +#ifndef CopFILE_set
6384 +# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
6388 +# define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
6392 +# define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
6396 +# define CopSTASHPV(c) ((c)->cop_stashpv)
6399 +#ifndef CopSTASHPV_set
6400 +# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
6404 +# define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
6407 +#ifndef CopSTASH_set
6408 +# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
6411 +#ifndef CopSTASH_eq
6412 +# define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
6413 + || (CopSTASHPV(c) && HvNAME(hv) \
6414 + && strEQ(CopSTASHPV(c), HvNAME(hv)))))
6419 +# define CopFILEGV(c) ((c)->cop_filegv)
6422 +#ifndef CopFILEGV_set
6423 +# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
6426 +#ifndef CopFILE_set
6427 +# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv))
6431 +# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
6435 +# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
6439 +# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
6443 +# define CopSTASH(c) ((c)->cop_stash)
6446 +#ifndef CopSTASH_set
6447 +# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
6451 +# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
6454 +#ifndef CopSTASHPV_set
6455 +# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
6458 +#ifndef CopSTASH_eq
6459 +# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv))
6462 +#endif /* USE_ITHREADS */
6463 +#ifndef IN_PERL_COMPILETIME
6464 +# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling)
6467 +#ifndef IN_LOCALE_RUNTIME
6468 +# define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE)
6471 +#ifndef IN_LOCALE_COMPILETIME
6472 +# define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE)
6476 +# define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
6478 +#ifndef IS_NUMBER_IN_UV
6479 +# define IS_NUMBER_IN_UV 0x01
6482 +#ifndef IS_NUMBER_GREATER_THAN_UV_MAX
6483 +# define IS_NUMBER_GREATER_THAN_UV_MAX 0x02
6486 +#ifndef IS_NUMBER_NOT_INT
6487 +# define IS_NUMBER_NOT_INT 0x04
6490 +#ifndef IS_NUMBER_NEG
6491 +# define IS_NUMBER_NEG 0x08
6494 +#ifndef IS_NUMBER_INFINITY
6495 +# define IS_NUMBER_INFINITY 0x10
6498 +#ifndef IS_NUMBER_NAN
6499 +# define IS_NUMBER_NAN 0x20
6501 +#ifndef GROK_NUMERIC_RADIX
6502 +# define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
6504 +#ifndef PERL_SCAN_GREATER_THAN_UV_MAX
6505 +# define PERL_SCAN_GREATER_THAN_UV_MAX 0x02
6508 +#ifndef PERL_SCAN_SILENT_ILLDIGIT
6509 +# define PERL_SCAN_SILENT_ILLDIGIT 0x04
6512 +#ifndef PERL_SCAN_ALLOW_UNDERSCORES
6513 +# define PERL_SCAN_ALLOW_UNDERSCORES 0x01
6516 +#ifndef PERL_SCAN_DISALLOW_PREFIX
6517 +# define PERL_SCAN_DISALLOW_PREFIX 0x02
6520 +#ifndef grok_numeric_radix
6521 +#if defined(NEED_grok_numeric_radix)
6522 +static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6525 +extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6528 +#ifdef grok_numeric_radix
6529 +# undef grok_numeric_radix
6531 +#define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
6532 +#define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
6534 +#if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
6536 +DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
6538 +#ifdef USE_LOCALE_NUMERIC
6539 +#ifdef PL_numeric_radix_sv
6540 + if (PL_numeric_radix_sv && IN_LOCALE) {
6542 + char* radix = SvPV(PL_numeric_radix_sv, len);
6543 + if (*sp + len <= send && memEQ(*sp, radix, len)) {
6549 + /* older perls don't have PL_numeric_radix_sv so the radix
6550 + * must manually be requested from locale.h
6552 +#include <locale.h>
6553 + dTHR; /* needed for older threaded perls */
6554 + struct lconv *lc = localeconv();
6555 + char *radix = lc->decimal_point;
6556 + if (radix && IN_LOCALE) {
6557 + STRLEN len = strlen(radix);
6558 + if (*sp + len <= send && memEQ(*sp, radix, len)) {
6564 +#endif /* USE_LOCALE_NUMERIC */
6565 + /* always try "." if numeric radix didn't match because
6566 + * we may have data from different locales mixed */
6567 + if (*sp < send && **sp == '.') {
6576 +#ifndef grok_number
6577 +#if defined(NEED_grok_number)
6578 +static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
6581 +extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
6585 +# undef grok_number
6587 +#define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
6588 +#define Perl_grok_number DPPP_(my_grok_number)
6590 +#if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
6592 +DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
6594 + const char *s = pv;
6595 + const char *send = pv + len;
6596 + const UV max_div_10 = UV_MAX / 10;
6597 + const char max_mod_10 = UV_MAX % 10;
6602 + while (s < send && isSPACE(*s))
6606 + } else if (*s == '-') {
6608 + numtype = IS_NUMBER_NEG;
6610 + else if (*s == '+')
6616 + /* next must be digit or the radix separator or beginning of infinity */
6617 + if (isDIGIT(*s)) {
6618 + /* UVs are at least 32 bits, so the first 9 decimal digits cannot
6620 + UV value = *s - '0';
6621 + /* This construction seems to be more optimiser friendly.
6622 + (without it gcc does the isDIGIT test and the *s - '0' separately)
6623 + With it gcc on arm is managing 6 instructions (6 cycles) per digit.
6624 + In theory the optimiser could deduce how far to unroll the loop
6625 + before checking for overflow. */
6627 + int digit = *s - '0';
6628 + if (digit >= 0 && digit <= 9) {
6629 + value = value * 10 + digit;
6632 + if (digit >= 0 && digit <= 9) {
6633 + value = value * 10 + digit;
6636 + if (digit >= 0 && digit <= 9) {
6637 + value = value * 10 + digit;
6640 + if (digit >= 0 && digit <= 9) {
6641 + value = value * 10 + digit;
6644 + if (digit >= 0 && digit <= 9) {
6645 + value = value * 10 + digit;
6648 + if (digit >= 0 && digit <= 9) {
6649 + value = value * 10 + digit;
6652 + if (digit >= 0 && digit <= 9) {
6653 + value = value * 10 + digit;
6656 + if (digit >= 0 && digit <= 9) {
6657 + value = value * 10 + digit;
6659 + /* Now got 9 digits, so need to check
6660 + each time for overflow. */
6662 + while (digit >= 0 && digit <= 9
6663 + && (value < max_div_10
6664 + || (value == max_div_10
6665 + && digit <= max_mod_10))) {
6666 + value = value * 10 + digit;
6672 + if (digit >= 0 && digit <= 9
6674 + /* value overflowed.
6675 + skip the remaining digits, don't
6676 + worry about setting *valuep. */
6679 + } while (s < send && isDIGIT(*s));
6681 + IS_NUMBER_GREATER_THAN_UV_MAX;
6701 + numtype |= IS_NUMBER_IN_UV;
6706 + if (GROK_NUMERIC_RADIX(&s, send)) {
6707 + numtype |= IS_NUMBER_NOT_INT;
6708 + while (s < send && isDIGIT(*s)) /* optional digits after the radix */
6712 + else if (GROK_NUMERIC_RADIX(&s, send)) {
6713 + numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
6714 + /* no digits before the radix means we need digits after it */
6715 + if (s < send && isDIGIT(*s)) {
6718 + } while (s < send && isDIGIT(*s));
6720 + /* integer approximation is valid - it's 0. */
6726 + } else if (*s == 'I' || *s == 'i') {
6727 + s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
6728 + s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
6729 + s++; if (s < send && (*s == 'I' || *s == 'i')) {
6730 + s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
6731 + s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
6732 + s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
6733 + s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
6737 + } else if (*s == 'N' || *s == 'n') {
6738 + /* XXX TODO: There are signaling NaNs and quiet NaNs. */
6739 + s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
6740 + s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
6747 + numtype &= IS_NUMBER_NEG; /* Keep track of sign */
6748 + numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
6749 + } else if (sawnan) {
6750 + numtype &= IS_NUMBER_NEG; /* Keep track of sign */
6751 + numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
6752 + } else if (s < send) {
6753 + /* we can have an optional exponent part */
6754 + if (*s == 'e' || *s == 'E') {
6755 + /* The only flag we keep is sign. Blow away any "it's UV" */
6756 + numtype &= IS_NUMBER_NEG;
6757 + numtype |= IS_NUMBER_NOT_INT;
6759 + if (s < send && (*s == '-' || *s == '+'))
6761 + if (s < send && isDIGIT(*s)) {
6764 + } while (s < send && isDIGIT(*s));
6770 + while (s < send && isSPACE(*s))
6774 + if (len == 10 && memEQ(pv, "0 but true", 10)) {
6777 + return IS_NUMBER_IN_UV;
6785 + * The grok_* routines have been modified to use warn() instead of
6786 + * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
6787 + * which is why the stack variable has been renamed to 'xdigit'.
6791 +#if defined(NEED_grok_bin)
6792 +static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
6795 +extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
6801 +#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
6802 +#define Perl_grok_bin DPPP_(my_grok_bin)
6804 +#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
6806 +DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
6808 + const char *s = start;
6809 + STRLEN len = *len_p;
6813 + const UV max_div_2 = UV_MAX / 2;
6814 + bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
6815 + bool overflowed = FALSE;
6817 + if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
6818 + /* strip off leading b or 0b.
6819 + for compatibility silently suffer "b" and "0b" as valid binary
6822 + if (s[0] == 'b') {
6826 + else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
6833 + for (; len-- && *s; s++) {
6835 + if (bit == '0' || bit == '1') {
6836 + /* Write it in this wonky order with a goto to attempt to get the
6837 + compiler to make the common case integer-only loop pretty tight.
6838 + With gcc seems to be much straighter code than old scan_bin. */
6840 + if (!overflowed) {
6841 + if (value <= max_div_2) {
6842 + value = (value << 1) | (bit - '0');
6845 + /* Bah. We're just overflowed. */
6846 + warn("Integer overflow in binary number");
6847 + overflowed = TRUE;
6848 + value_nv = (NV) value;
6851 + /* If an NV has not enough bits in its mantissa to
6852 + * represent a UV this summing of small low-order numbers
6853 + * is a waste of time (because the NV cannot preserve
6854 + * the low-order bits anyway): we could just remember when
6855 + * did we overflow and in the end just multiply value_nv by the
6856 + * right amount. */
6857 + value_nv += (NV)(bit - '0');
6860 + if (bit == '_' && len && allow_underscores && (bit = s[1])
6861 + && (bit == '0' || bit == '1'))
6867 + if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
6868 + warn("Illegal binary digit '%c' ignored", *s);
6872 + if ( ( overflowed && value_nv > 4294967295.0)
6874 + || (!overflowed && value > 0xffffffff )
6877 + warn("Binary number > 0b11111111111111111111111111111111 non-portable");
6879 + *len_p = s - start;
6880 + if (!overflowed) {
6884 + *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
6886 + *result = value_nv;
6893 +#if defined(NEED_grok_hex)
6894 +static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
6897 +extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
6903 +#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
6904 +#define Perl_grok_hex DPPP_(my_grok_hex)
6906 +#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
6908 +DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
6910 + const char *s = start;
6911 + STRLEN len = *len_p;
6915 + const UV max_div_16 = UV_MAX / 16;
6916 + bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
6917 + bool overflowed = FALSE;
6918 + const char *xdigit;
6920 + if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
6921 + /* strip off leading x or 0x.
6922 + for compatibility silently suffer "x" and "0x" as valid hex numbers.
6925 + if (s[0] == 'x') {
6929 + else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
6936 + for (; len-- && *s; s++) {
6937 + xdigit = strchr((char *) PL_hexdigit, *s);
6939 + /* Write it in this wonky order with a goto to attempt to get the
6940 + compiler to make the common case integer-only loop pretty tight.
6941 + With gcc seems to be much straighter code than old scan_hex. */
6943 + if (!overflowed) {
6944 + if (value <= max_div_16) {
6945 + value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
6948 + warn("Integer overflow in hexadecimal number");
6949 + overflowed = TRUE;
6950 + value_nv = (NV) value;
6953 + /* If an NV has not enough bits in its mantissa to
6954 + * represent a UV this summing of small low-order numbers
6955 + * is a waste of time (because the NV cannot preserve
6956 + * the low-order bits anyway): we could just remember when
6957 + * did we overflow and in the end just multiply value_nv by the
6958 + * right amount of 16-tuples. */
6959 + value_nv += (NV)((xdigit - PL_hexdigit) & 15);
6962 + if (*s == '_' && len && allow_underscores && s[1]
6963 + && (xdigit = strchr((char *) PL_hexdigit, s[1])))
6969 + if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
6970 + warn("Illegal hexadecimal digit '%c' ignored", *s);
6974 + if ( ( overflowed && value_nv > 4294967295.0)
6976 + || (!overflowed && value > 0xffffffff )
6979 + warn("Hexadecimal number > 0xffffffff non-portable");
6981 + *len_p = s - start;
6982 + if (!overflowed) {
6986 + *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
6988 + *result = value_nv;
6995 +#if defined(NEED_grok_oct)
6996 +static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
6999 +extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7005 +#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
7006 +#define Perl_grok_oct DPPP_(my_grok_oct)
7008 +#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
7010 +DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7012 + const char *s = start;
7013 + STRLEN len = *len_p;
7017 + const UV max_div_8 = UV_MAX / 8;
7018 + bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7019 + bool overflowed = FALSE;
7021 + for (; len-- && *s; s++) {
7022 + /* gcc 2.95 optimiser not smart enough to figure that this subtraction
7023 + out front allows slicker code. */
7024 + int digit = *s - '0';
7025 + if (digit >= 0 && digit <= 7) {
7026 + /* Write it in this wonky order with a goto to attempt to get the
7027 + compiler to make the common case integer-only loop pretty tight.
7030 + if (!overflowed) {
7031 + if (value <= max_div_8) {
7032 + value = (value << 3) | digit;
7035 + /* Bah. We're just overflowed. */
7036 + warn("Integer overflow in octal number");
7037 + overflowed = TRUE;
7038 + value_nv = (NV) value;
7041 + /* If an NV has not enough bits in its mantissa to
7042 + * represent a UV this summing of small low-order numbers
7043 + * is a waste of time (because the NV cannot preserve
7044 + * the low-order bits anyway): we could just remember when
7045 + * did we overflow and in the end just multiply value_nv by the
7046 + * right amount of 8-tuples. */
7047 + value_nv += (NV)digit;
7050 + if (digit == ('_' - '0') && len && allow_underscores
7051 + && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
7057 + /* Allow \octal to work the DWIM way (that is, stop scanning
7058 + * as soon as non-octal characters are seen, complain only iff
7059 + * someone seems to want to use the digits eight and nine). */
7060 + if (digit == 8 || digit == 9) {
7061 + if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7062 + warn("Illegal octal digit '%c' ignored", *s);
7067 + if ( ( overflowed && value_nv > 4294967295.0)
7069 + || (!overflowed && value > 0xffffffff )
7072 + warn("Octal number > 037777777777 non-portable");
7074 + *len_p = s - start;
7075 + if (!overflowed) {
7079 + *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7081 + *result = value_nv;
7087 +#if !defined(my_snprintf)
7088 +#if defined(NEED_my_snprintf)
7089 +static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7092 +extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7095 +#define my_snprintf DPPP_(my_my_snprintf)
7096 +#define Perl_my_snprintf DPPP_(my_my_snprintf)
7098 +#if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
7101 +DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
7106 + va_start(ap, format);
7107 +#ifdef HAS_VSNPRINTF
7108 + retval = vsnprintf(buffer, len, format, ap);
7110 + retval = vsprintf(buffer, format, ap);
7113 + if (retval < 0 || (len > 0 && (Size_t)retval >= len))
7114 + Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
7121 +#if !defined(my_sprintf)
7122 +#if defined(NEED_my_sprintf)
7123 +static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7126 +extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7129 +#define my_sprintf DPPP_(my_my_sprintf)
7130 +#define Perl_my_sprintf DPPP_(my_my_sprintf)
7132 +#if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
7135 +DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
7138 + va_start(args, pat);
7139 + vsprintf(buffer, pat, args);
7141 + return strlen(buffer);
7149 +# define dXCPT dJMPENV; int rEtV = 0
7150 +# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0)
7151 +# define XCPT_TRY_END JMPENV_POP;
7152 +# define XCPT_CATCH if (rEtV != 0)
7153 +# define XCPT_RETHROW JMPENV_JUMP(rEtV)
7155 +# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0
7156 +# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
7157 +# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf);
7158 +# define XCPT_CATCH if (rEtV != 0)
7159 +# define XCPT_RETHROW Siglongjmp(top_env, rEtV)
7163 +#if !defined(my_strlcat)
7164 +#if defined(NEED_my_strlcat)
7165 +static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7168 +extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7171 +#define my_strlcat DPPP_(my_my_strlcat)
7172 +#define Perl_my_strlcat DPPP_(my_my_strlcat)
7174 +#if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
7177 +DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
7179 + Size_t used, length, copy;
7181 + used = strlen(dst);
7182 + length = strlen(src);
7183 + if (size > 0 && used < size - 1) {
7184 + copy = (length >= size - used) ? size - used - 1 : length;
7185 + memcpy(dst + used, src, copy);
7186 + dst[used + copy] = '\0';
7188 + return used + length;
7193 +#if !defined(my_strlcpy)
7194 +#if defined(NEED_my_strlcpy)
7195 +static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7198 +extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7201 +#define my_strlcpy DPPP_(my_my_strlcpy)
7202 +#define Perl_my_strlcpy DPPP_(my_my_strlcpy)
7204 +#if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
7207 +DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
7209 + Size_t length, copy;
7211 + length = strlen(src);
7213 + copy = (length >= size) ? size - 1 : length;
7214 + memcpy(dst, src, copy);
7222 +#ifndef PERL_PV_ESCAPE_QUOTE
7223 +# define PERL_PV_ESCAPE_QUOTE 0x0001
7226 +#ifndef PERL_PV_PRETTY_QUOTE
7227 +# define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
7230 +#ifndef PERL_PV_PRETTY_ELLIPSES
7231 +# define PERL_PV_PRETTY_ELLIPSES 0x0002
7234 +#ifndef PERL_PV_PRETTY_LTGT
7235 +# define PERL_PV_PRETTY_LTGT 0x0004
7238 +#ifndef PERL_PV_ESCAPE_FIRSTCHAR
7239 +# define PERL_PV_ESCAPE_FIRSTCHAR 0x0008
7242 +#ifndef PERL_PV_ESCAPE_UNI
7243 +# define PERL_PV_ESCAPE_UNI 0x0100
7246 +#ifndef PERL_PV_ESCAPE_UNI_DETECT
7247 +# define PERL_PV_ESCAPE_UNI_DETECT 0x0200
7250 +#ifndef PERL_PV_ESCAPE_ALL
7251 +# define PERL_PV_ESCAPE_ALL 0x1000
7254 +#ifndef PERL_PV_ESCAPE_NOBACKSLASH
7255 +# define PERL_PV_ESCAPE_NOBACKSLASH 0x2000
7258 +#ifndef PERL_PV_ESCAPE_NOCLEAR
7259 +# define PERL_PV_ESCAPE_NOCLEAR 0x4000
7262 +#ifndef PERL_PV_ESCAPE_RE
7263 +# define PERL_PV_ESCAPE_RE 0x8000
7266 +#ifndef PERL_PV_PRETTY_NOCLEAR
7267 +# define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR
7269 +#ifndef PERL_PV_PRETTY_DUMP
7270 +# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
7273 +#ifndef PERL_PV_PRETTY_REGPROP
7274 +# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
7278 + * Note that unicode functionality is only backported to
7279 + * those perl versions that support it. For older perl
7280 + * versions, the implementation will fall back to bytes.
7284 +#if defined(NEED_pv_escape)
7285 +static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7288 +extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7294 +#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
7295 +#define Perl_pv_escape DPPP_(my_pv_escape)
7297 +#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
7300 +DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
7301 + const STRLEN count, const STRLEN max,
7302 + STRLEN * const escaped, const U32 flags)
7304 + const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
7305 + const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
7306 + char octbuf[32] = "%123456789ABCDF";
7308 + STRLEN chsize = 0;
7309 + STRLEN readsize = 1;
7310 +#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7311 + bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
7313 + const char *pv = str;
7314 + const char * const end = pv + count;
7317 + if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
7318 + sv_setpvs(dsv, "");
7320 +#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7321 + if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
7325 + for (; pv < end && (!max || wrote < max) ; pv += readsize) {
7327 +#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7328 + isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
7331 + const U8 c = (U8)u & 0xFF;
7333 + if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
7334 + if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7335 + chsize = my_snprintf(octbuf, sizeof octbuf,
7338 + chsize = my_snprintf(octbuf, sizeof octbuf,
7339 + "%cx{%"UVxf"}", esc, u);
7340 + } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
7343 + if (c == dq || c == esc || !isPRINT(c)) {
7346 + case '\\' : /* fallthrough */
7347 + case '%' : if (c == esc)
7352 + case '\v' : octbuf[1] = 'v'; break;
7353 + case '\t' : octbuf[1] = 't'; break;
7354 + case '\r' : octbuf[1] = 'r'; break;
7355 + case '\n' : octbuf[1] = 'n'; break;
7356 + case '\f' : octbuf[1] = 'f'; break;
7357 + case '"' : if (dq == '"')
7362 + default: chsize = my_snprintf(octbuf, sizeof octbuf,
7363 + pv < end && isDIGIT((U8)*(pv+readsize))
7364 + ? "%c%03o" : "%c%o", esc, c);
7370 + if (max && wrote + chsize > max) {
7372 + } else if (chsize > 1) {
7373 + sv_catpvn(dsv, octbuf, chsize);
7377 + my_snprintf(tmp, sizeof tmp, "%c", c);
7378 + sv_catpvn(dsv, tmp, 1);
7381 + if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7384 + if (escaped != NULL)
7385 + *escaped= pv - str;
7386 + return SvPVX(dsv);
7393 +#if defined(NEED_pv_pretty)
7394 +static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
7397 +extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
7403 +#define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
7404 +#define Perl_pv_pretty DPPP_(my_pv_pretty)
7406 +#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
7409 +DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
7410 + const STRLEN max, char const * const start_color, char const * const end_color,
7413 + const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
7416 + if (!(flags & PERL_PV_PRETTY_NOCLEAR))
7417 + sv_setpvs(dsv, "");
7420 + sv_catpvs(dsv, "\"");
7421 + else if (flags & PERL_PV_PRETTY_LTGT)
7422 + sv_catpvs(dsv, "<");
7424 + if (start_color != NULL)
7425 + sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
7427 + pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
7429 + if (end_color != NULL)
7430 + sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
7433 + sv_catpvs(dsv, "\"");
7434 + else if (flags & PERL_PV_PRETTY_LTGT)
7435 + sv_catpvs(dsv, ">");
7437 + if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
7438 + sv_catpvs(dsv, "...");
7440 + return SvPVX(dsv);
7447 +#if defined(NEED_pv_display)
7448 +static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7451 +extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7457 +#define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
7458 +#define Perl_pv_display DPPP_(my_pv_display)
7460 +#if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
7463 +DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
7465 + pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
7466 + if (len > cur && pv[cur] == '\0')
7467 + sv_catpvs(dsv, "\\0");
7468 + return SvPVX(dsv);
7474 +#endif /* _P_P_PORTABILITY_H_ */
7476 +/* End of File ppport.h */