Bump version, write README and update Changes
[convert-base91.git] / ppport.h
CommitLineData
1a1c8cd6
MG
1#if 0
2<<'SKIP';
3#endif
4/*
5----------------------------------------------------------------------
6
7 ppport.h -- Perl/Pollution/Portability Version 3.35
8
9 Automatically created by Devel::PPPort running under perl 5.026001.
10
11 Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
12 includes in parts/inc/ instead.
13
14 Use 'perldoc ppport.h' to view the documentation below.
15
16----------------------------------------------------------------------
17
18SKIP
19
20=pod
21
22=head1 NAME
23
24ppport.h - Perl/Pollution/Portability version 3.35
25
26=head1 SYNOPSIS
27
28 perl ppport.h [options] [source files]
29
30 Searches current directory for files if no [source files] are given
31
32 --help show short help
33
34 --version show version
35
36 --patch=file write one patch file with changes
37 --copy=suffix write changed copies with suffix
38 --diff=program use diff program and options
39
40 --compat-version=version provide compatibility with Perl version
41 --cplusplus accept C++ comments
42
43 --quiet don't output anything except fatal errors
44 --nodiag don't show diagnostics
45 --nohints don't show hints
46 --nochanges don't suggest changes
47 --nofilter don't filter input files
48
49 --strip strip all script and doc functionality from
50 ppport.h
51
52 --list-provided list provided API
53 --list-unsupported list unsupported API
54 --api-info=name show Perl API portability information
55
56=head1 COMPATIBILITY
57
58This version of F<ppport.h> is designed to support operation with Perl
59installations back to 5.003, and has been tested up to 5.20.
60
61=head1 OPTIONS
62
63=head2 --help
64
65Display a brief usage summary.
66
67=head2 --version
68
69Display the version of F<ppport.h>.
70
71=head2 --patch=I<file>
72
73If this option is given, a single patch file will be created if
74any changes are suggested. This requires a working diff program
75to be installed on your system.
76
77=head2 --copy=I<suffix>
78
79If this option is given, a copy of each file will be saved with
80the given suffix that contains the suggested changes. This does
81not require any external programs. Note that this does not
82automagically add a dot between the original filename and the
83suffix. If you want the dot, you have to include it in the option
84argument.
85
86If neither C<--patch> or C<--copy> are given, the default is to
87simply print the diffs for each file. This requires either
88C<Text::Diff> or a C<diff> program to be installed.
89
90=head2 --diff=I<program>
91
92Manually set the diff program and options to use. The default
93is to use C<Text::Diff>, when installed, and output unified
94context diffs.
95
96=head2 --compat-version=I<version>
97
98Tell F<ppport.h> to check for compatibility with the given
99Perl version. The default is to check for compatibility with Perl
100version 5.003. You can use this option to reduce the output
101of F<ppport.h> if you intend to be backward compatible only
102down to a certain Perl version.
103
104=head2 --cplusplus
105
106Usually, F<ppport.h> will detect C++ style comments and
107replace them with C style comments for portability reasons.
108Using this option instructs F<ppport.h> to leave C++
109comments untouched.
110
111=head2 --quiet
112
113Be quiet. Don't print anything except fatal errors.
114
115=head2 --nodiag
116
117Don't output any diagnostic messages. Only portability
118alerts will be printed.
119
120=head2 --nohints
121
122Don't output any hints. Hints often contain useful portability
123notes. Warnings will still be displayed.
124
125=head2 --nochanges
126
127Don't suggest any changes. Only give diagnostic output and hints
128unless these are also deactivated.
129
130=head2 --nofilter
131
132Don't filter the list of input files. By default, files not looking
133like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
134
135=head2 --strip
136
137Strip all script and documentation functionality from F<ppport.h>.
138This reduces the size of F<ppport.h> dramatically and may be useful
139if you want to include F<ppport.h> in smaller modules without
140increasing their distribution size too much.
141
142The stripped F<ppport.h> will have a C<--unstrip> option that allows
143you to undo the stripping, but only if an appropriate C<Devel::PPPort>
144module is installed.
145
146=head2 --list-provided
147
148Lists the API elements for which compatibility is provided by
149F<ppport.h>. Also lists if it must be explicitly requested,
150if it has dependencies, and if there are hints or warnings for it.
151
152=head2 --list-unsupported
153
154Lists the API elements that are known not to be supported by
155F<ppport.h> and below which version of Perl they probably
156won't be available or work.
157
158=head2 --api-info=I<name>
159
160Show portability information for API elements matching I<name>.
161If I<name> is surrounded by slashes, it is interpreted as a regular
162expression.
163
164=head1 DESCRIPTION
165
166In order for a Perl extension (XS) module to be as portable as possible
167across differing versions of Perl itself, certain steps need to be taken.
168
169=over 4
170
171=item *
172
173Including this header is the first major one. This alone will give you
174access to a large part of the Perl API that hasn't been available in
175earlier Perl releases. Use
176
177 perl ppport.h --list-provided
178
179to see which API elements are provided by ppport.h.
180
181=item *
182
183You should avoid using deprecated parts of the API. For example, using
184global Perl variables without the C<PL_> prefix is deprecated. Also,
185some API functions used to have a C<perl_> prefix. Using this form is
186also deprecated. You can safely use the supported API, as F<ppport.h>
187will provide wrappers for older Perl versions.
188
189=item *
190
191If you use one of a few functions or variables that were not present in
192earlier versions of Perl, and that can't be provided using a macro, you
193have to explicitly request support for these functions by adding one or
194more C<#define>s in your source code before the inclusion of F<ppport.h>.
195
196These functions or variables will be marked C<explicit> in the list shown
197by C<--list-provided>.
198
199Depending on whether you module has a single or multiple files that
200use such functions or variables, you want either C<static> or global
201variants.
202
203For a C<static> function or variable (used only in a single source
204file), use:
205
206 #define NEED_function
207 #define NEED_variable
208
209For a global function or variable (used in multiple source files),
210use:
211
212 #define NEED_function_GLOBAL
213 #define NEED_variable_GLOBAL
214
215Note that you mustn't have more than one global request for the
216same function or variable in your project.
217
218 Function / Variable Static Request Global Request
219 -----------------------------------------------------------------------------------------
220 PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL
221 PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL
222 SvRX() NEED_SvRX NEED_SvRX_GLOBAL
223 caller_cx() NEED_caller_cx NEED_caller_cx_GLOBAL
224 eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL
225 grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL
226 grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL
227 grok_number() NEED_grok_number NEED_grok_number_GLOBAL
228 grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL
229 grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL
230 gv_fetchpvn_flags() NEED_gv_fetchpvn_flags NEED_gv_fetchpvn_flags_GLOBAL
231 load_module() NEED_load_module NEED_load_module_GLOBAL
232 mg_findext() NEED_mg_findext NEED_mg_findext_GLOBAL
233 my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL
234 my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL
235 my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL
236 my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL
237 newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
238 newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
239 newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL
240 newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL
241 newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL
242 pv_display() NEED_pv_display NEED_pv_display_GLOBAL
243 pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL
244 pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL
245 sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL
246 sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
247 sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
248 sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
249 sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL
250 sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL
251 sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL
252 sv_unmagicext() NEED_sv_unmagicext NEED_sv_unmagicext_GLOBAL
253 vload_module() NEED_vload_module NEED_vload_module_GLOBAL
254 vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL
255 warner() NEED_warner NEED_warner_GLOBAL
256
257To avoid namespace conflicts, you can change the namespace of the
258explicitly exported functions / variables using the C<DPPP_NAMESPACE>
259macro. Just C<#define> the macro before including C<ppport.h>:
260
261 #define DPPP_NAMESPACE MyOwnNamespace_
262 #include "ppport.h"
263
264The default namespace is C<DPPP_>.
265
266=back
267
268The good thing is that most of the above can be checked by running
269F<ppport.h> on your source code. See the next section for
270details.
271
272=head1 EXAMPLES
273
274To verify whether F<ppport.h> is needed for your module, whether you
275should make any changes to your code, and whether any special defines
276should be used, F<ppport.h> can be run as a Perl script to check your
277source code. Simply say:
278
279 perl ppport.h
280
281The result will usually be a list of patches suggesting changes
282that should at least be acceptable, if not necessarily the most
283efficient solution, or a fix for all possible problems.
284
285If you know that your XS module uses features only available in
286newer Perl releases, if you're aware that it uses C++ comments,
287and if you want all suggestions as a single patch file, you could
288use something like this:
289
290 perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
291
292If you only want your code to be scanned without any suggestions
293for changes, use:
294
295 perl ppport.h --nochanges
296
297You can specify a different C<diff> program or options, using
298the C<--diff> option:
299
300 perl ppport.h --diff='diff -C 10'
301
302This would output context diffs with 10 lines of context.
303
304If you want to create patched copies of your files instead, use:
305
306 perl ppport.h --copy=.new
307
308To display portability information for the C<newSVpvn> function,
309use:
310
311 perl ppport.h --api-info=newSVpvn
312
313Since the argument to C<--api-info> can be a regular expression,
314you can use
315
316 perl ppport.h --api-info=/_nomg$/
317
318to display portability information for all C<_nomg> functions or
319
320 perl ppport.h --api-info=/./
321
322to display information for all known API elements.
323
324=head1 BUGS
325
326If this version of F<ppport.h> is causing failure during
327the compilation of this module, please check if newer versions
328of either this module or C<Devel::PPPort> are available on CPAN
329before sending a bug report.
330
331If F<ppport.h> was generated using the latest version of
332C<Devel::PPPort> and is causing failure of this module, please
333file a bug report here: L<https://github.com/mhx/Devel-PPPort/issues/>
334
335Please include the following information:
336
337=over 4
338
339=item 1.
340
341The complete output from running "perl -V"
342
343=item 2.
344
345This file.
346
347=item 3.
348
349The name and version of the module you were trying to build.
350
351=item 4.
352
353A full log of the build that failed.
354
355=item 5.
356
357Any other information that you think could be relevant.
358
359=back
360
361For the latest version of this code, please get the C<Devel::PPPort>
362module from CPAN.
363
364=head1 COPYRIGHT
365
366Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
367
368Version 2.x, Copyright (C) 2001, Paul Marquess.
369
370Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
371
372This program is free software; you can redistribute it and/or
373modify it under the same terms as Perl itself.
374
375=head1 SEE ALSO
376
377See L<Devel::PPPort>.
378
379=cut
380
381use strict;
382
383# Disable broken TRIE-optimization
384BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
385
386my $VERSION = 3.35;
387
388my %opt = (
389 quiet => 0,
390 diag => 1,
391 hints => 1,
392 changes => 1,
393 cplusplus => 0,
394 filter => 1,
395 strip => 0,
396 version => 0,
397);
398
399my($ppport) = $0 =~ /([\w.]+)$/;
400my $LF = '(?:\r\n|[\r\n])'; # line feed
401my $HS = "[ \t]"; # horizontal whitespace
402
403# Never use C comments in this file!
404my $ccs = '/'.'*';
405my $cce = '*'.'/';
406my $rccs = quotemeta $ccs;
407my $rcce = quotemeta $cce;
408
409eval {
410 require Getopt::Long;
411 Getopt::Long::GetOptions(\%opt, qw(
412 help quiet diag! filter! hints! changes! cplusplus strip version
413 patch=s copy=s diff=s compat-version=s
414 list-provided list-unsupported api-info=s
415 )) or usage();
416};
417
418if ($@ and grep /^-/, @ARGV) {
419 usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
420 die "Getopt::Long not found. Please don't use any options.\n";
421}
422
423if ($opt{version}) {
424 print "This is $0 $VERSION.\n";
425 exit 0;
426}
427
428usage() if $opt{help};
429strip() if $opt{strip};
430
431if (exists $opt{'compat-version'}) {
432 my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
433 if ($@) {
434 die "Invalid version number format: '$opt{'compat-version'}'\n";
435 }
436 die "Only Perl 5 is supported\n" if $r != 5;
437 die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
438 $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
439}
440else {
441 $opt{'compat-version'} = 5;
442}
443
444my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
445 ? ( $1 => {
446 ($2 ? ( base => $2 ) : ()),
447 ($3 ? ( todo => $3 ) : ()),
448 (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
449 (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
450 (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
451 } )
452 : die "invalid spec: $_" } qw(
453ASCII_TO_NEED||5.007001|n
454AvFILLp|5.004050||p
455AvFILL|||
456BhkDISABLE||5.024000|
457BhkENABLE||5.024000|
458BhkENTRY_set||5.024000|
459BhkENTRY|||
460BhkFLAGS|||
461CALL_BLOCK_HOOKS|||
462CLASS|||n
463CPERLscope|5.005000||p
464CX_CURPAD_SAVE|||
465CX_CURPAD_SV|||
466C_ARRAY_END|5.013002||p
467C_ARRAY_LENGTH|5.008001||p
468CopFILEAV|5.006000||p
469CopFILEGV_set|5.006000||p
470CopFILEGV|5.006000||p
471CopFILESV|5.006000||p
472CopFILE_set|5.006000||p
473CopFILE|5.006000||p
474CopSTASHPV_set|5.006000||p
475CopSTASHPV|5.006000||p
476CopSTASH_eq|5.006000||p
477CopSTASH_set|5.006000||p
478CopSTASH|5.006000||p
479CopyD|5.009002|5.004050|p
480Copy|||
481CvPADLIST||5.008001|
482CvSTASH|||
483CvWEAKOUTSIDE|||
484DECLARATION_FOR_LC_NUMERIC_MANIPULATION||5.021010|n
485DEFSV_set|5.010001||p
486DEFSV|5.004050||p
487DO_UTF8||5.006000|
488END_EXTERN_C|5.005000||p
489ENTER|||
490ERRSV|5.004050||p
491EXTEND|||
492EXTERN_C|5.005000||p
493F0convert|||n
494FREETMPS|||
495GIMME_V||5.004000|n
496GIMME|||n
497GROK_NUMERIC_RADIX|5.007002||p
498G_ARRAY|||
499G_DISCARD|||
500G_EVAL|||
501G_METHOD|5.006001||p
502G_NOARGS|||
503G_SCALAR|||
504G_VOID||5.004000|
505GetVars|||
506GvAV|||
507GvCV|||
508GvHV|||
509GvSV|||
510Gv_AMupdate||5.011000|
511HEf_SVKEY|5.003070||p
512HeHASH||5.003070|
513HeKEY||5.003070|
514HeKLEN||5.003070|
515HePV||5.004000|
516HeSVKEY_force||5.003070|
517HeSVKEY_set||5.004000|
518HeSVKEY||5.003070|
519HeUTF8|5.010001|5.008000|p
520HeVAL||5.003070|
521HvENAMELEN||5.015004|
522HvENAMEUTF8||5.015004|
523HvENAME||5.013007|
524HvNAMELEN_get|5.009003||p
525HvNAMELEN||5.015004|
526HvNAMEUTF8||5.015004|
527HvNAME_get|5.009003||p
528HvNAME|||
529INT2PTR|5.006000||p
530IN_LOCALE_COMPILETIME|5.007002||p
531IN_LOCALE_RUNTIME|5.007002||p
532IN_LOCALE|5.007002||p
533IN_PERL_COMPILETIME|5.008001||p
534IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
535IS_NUMBER_INFINITY|5.007002||p
536IS_NUMBER_IN_UV|5.007002||p
537IS_NUMBER_NAN|5.007003||p
538IS_NUMBER_NEG|5.007002||p
539IS_NUMBER_NOT_INT|5.007002||p
540IVSIZE|5.006000||p
541IVTYPE|5.006000||p
542IVdf|5.006000||p
543LEAVE|||
544LINKLIST||5.013006|
545LVRET|||
546MARK|||
547MULTICALL||5.024000|
548MUTABLE_PTR|5.010001||p
549MUTABLE_SV|5.010001||p
550MY_CXT_CLONE|5.009002||p
551MY_CXT_INIT|5.007003||p
552MY_CXT|5.007003||p
553MoveD|5.009002|5.004050|p
554Move|||
555NATIVE_TO_NEED||5.007001|n
556NOOP|5.005000||p
557NUM2PTR|5.006000||p
558NVTYPE|5.006000||p
559NVef|5.006001||p
560NVff|5.006001||p
561NVgf|5.006001||p
562Newxc|5.009003||p
563Newxz|5.009003||p
564Newx|5.009003||p
565Nullav|||
566Nullch|||
567Nullcv|||
568Nullhv|||
569Nullsv|||
570OP_CLASS||5.013007|
571OP_DESC||5.007003|
572OP_NAME||5.007003|
573OP_TYPE_IS_OR_WAS||5.019010|
574OP_TYPE_IS||5.019007|
575ORIGMARK|||
576OpHAS_SIBLING|5.021007||p
577OpLASTSIB_set|5.021011||p
578OpMAYBESIB_set|5.021011||p
579OpMORESIB_set|5.021011||p
580OpSIBLING|5.021007||p
581PAD_BASE_SV|||
582PAD_CLONE_VARS|||
583PAD_COMPNAME_FLAGS|||
584PAD_COMPNAME_GEN_set|||
585PAD_COMPNAME_GEN|||
586PAD_COMPNAME_OURSTASH|||
587PAD_COMPNAME_PV|||
588PAD_COMPNAME_TYPE|||
589PAD_RESTORE_LOCAL|||
590PAD_SAVE_LOCAL|||
591PAD_SAVE_SETNULLPAD|||
592PAD_SETSV|||
593PAD_SET_CUR_NOSAVE|||
594PAD_SET_CUR|||
595PAD_SVl|||
596PAD_SV|||
597PERLIO_FUNCS_CAST|5.009003||p
598PERLIO_FUNCS_DECL|5.009003||p
599PERL_ABS|5.008001||p
600PERL_BCDVERSION|5.024000||p
601PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
602PERL_HASH|5.003070||p
603PERL_INT_MAX|5.003070||p
604PERL_INT_MIN|5.003070||p
605PERL_LONG_MAX|5.003070||p
606PERL_LONG_MIN|5.003070||p
607PERL_MAGIC_arylen|5.007002||p
608PERL_MAGIC_backref|5.007002||p
609PERL_MAGIC_bm|5.007002||p
610PERL_MAGIC_collxfrm|5.007002||p
611PERL_MAGIC_dbfile|5.007002||p
612PERL_MAGIC_dbline|5.007002||p
613PERL_MAGIC_defelem|5.007002||p
614PERL_MAGIC_envelem|5.007002||p
615PERL_MAGIC_env|5.007002||p
616PERL_MAGIC_ext|5.007002||p
617PERL_MAGIC_fm|5.007002||p
618PERL_MAGIC_glob|5.024000||p
619PERL_MAGIC_isaelem|5.007002||p
620PERL_MAGIC_isa|5.007002||p
621PERL_MAGIC_mutex|5.024000||p
622PERL_MAGIC_nkeys|5.007002||p
623PERL_MAGIC_overload_elem|5.024000||p
624PERL_MAGIC_overload_table|5.007002||p
625PERL_MAGIC_overload|5.024000||p
626PERL_MAGIC_pos|5.007002||p
627PERL_MAGIC_qr|5.007002||p
628PERL_MAGIC_regdata|5.007002||p
629PERL_MAGIC_regdatum|5.007002||p
630PERL_MAGIC_regex_global|5.007002||p
631PERL_MAGIC_shared_scalar|5.007003||p
632PERL_MAGIC_shared|5.007003||p
633PERL_MAGIC_sigelem|5.007002||p
634PERL_MAGIC_sig|5.007002||p
635PERL_MAGIC_substr|5.007002||p
636PERL_MAGIC_sv|5.007002||p
637PERL_MAGIC_taint|5.007002||p
638PERL_MAGIC_tiedelem|5.007002||p
639PERL_MAGIC_tiedscalar|5.007002||p
640PERL_MAGIC_tied|5.007002||p
641PERL_MAGIC_utf8|5.008001||p
642PERL_MAGIC_uvar_elem|5.007003||p
643PERL_MAGIC_uvar|5.007002||p
644PERL_MAGIC_vec|5.007002||p
645PERL_MAGIC_vstring|5.008001||p
646PERL_PV_ESCAPE_ALL|5.009004||p
647PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p
648PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p
649PERL_PV_ESCAPE_NOCLEAR|5.009004||p
650PERL_PV_ESCAPE_QUOTE|5.009004||p
651PERL_PV_ESCAPE_RE|5.009005||p
652PERL_PV_ESCAPE_UNI_DETECT|5.009004||p
653PERL_PV_ESCAPE_UNI|5.009004||p
654PERL_PV_PRETTY_DUMP|5.009004||p
655PERL_PV_PRETTY_ELLIPSES|5.010000||p
656PERL_PV_PRETTY_LTGT|5.009004||p
657PERL_PV_PRETTY_NOCLEAR|5.010000||p
658PERL_PV_PRETTY_QUOTE|5.009004||p
659PERL_PV_PRETTY_REGPROP|5.009004||p
660PERL_QUAD_MAX|5.003070||p
661PERL_QUAD_MIN|5.003070||p
662PERL_REVISION|5.006000||p
663PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
664PERL_SCAN_DISALLOW_PREFIX|5.007003||p
665PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
666PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
667PERL_SHORT_MAX|5.003070||p
668PERL_SHORT_MIN|5.003070||p
669PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
670PERL_SUBVERSION|5.006000||p
671PERL_SYS_INIT3||5.006000|
672PERL_SYS_INIT|||
673PERL_SYS_TERM||5.024000|
674PERL_UCHAR_MAX|5.003070||p
675PERL_UCHAR_MIN|5.003070||p
676PERL_UINT_MAX|5.003070||p
677PERL_UINT_MIN|5.003070||p
678PERL_ULONG_MAX|5.003070||p
679PERL_ULONG_MIN|5.003070||p
680PERL_UNUSED_ARG|5.009003||p
681PERL_UNUSED_CONTEXT|5.009004||p
682PERL_UNUSED_DECL|5.007002||p
683PERL_UNUSED_RESULT|5.021001||p
684PERL_UNUSED_VAR|5.007002||p
685PERL_UQUAD_MAX|5.003070||p
686PERL_UQUAD_MIN|5.003070||p
687PERL_USE_GCC_BRACE_GROUPS|5.009004||p
688PERL_USHORT_MAX|5.003070||p
689PERL_USHORT_MIN|5.003070||p
690PERL_VERSION|5.006000||p
691PL_DBsignal|5.005000||p
692PL_DBsingle|||pn
693PL_DBsub|||pn
694PL_DBtrace|||pn
695PL_Sv|5.005000||p
696PL_bufend|5.024000||p
697PL_bufptr|5.024000||p
698PL_check||5.006000|
699PL_compiling|5.004050||p
700PL_comppad_name||5.017004|
701PL_comppad||5.008001|
702PL_copline|5.024000||p
703PL_curcop|5.004050||p
704PL_curpad||5.005000|
705PL_curstash|5.004050||p
706PL_debstash|5.004050||p
707PL_defgv|5.004050||p
708PL_diehook|5.004050||p
709PL_dirty|5.004050||p
710PL_dowarn|||pn
711PL_errgv|5.004050||p
712PL_error_count|5.024000||p
713PL_expect|5.024000||p
714PL_hexdigit|5.005000||p
715PL_hints|5.005000||p
716PL_in_my_stash|5.024000||p
717PL_in_my|5.024000||p
718PL_keyword_plugin||5.011002|
719PL_last_in_gv|||n
720PL_laststatval|5.005000||p
721PL_lex_state|5.024000||p
722PL_lex_stuff|5.024000||p
723PL_linestr|5.024000||p
724PL_modglobal||5.005000|n
725PL_na|5.004050||pn
726PL_no_modify|5.006000||p
727PL_ofsgv|||n
728PL_opfreehook||5.011000|n
729PL_parser|5.009005||p
730PL_peepp||5.007003|n
731PL_perl_destruct_level|5.004050||p
732PL_perldb|5.004050||p
733PL_ppaddr|5.006000||p
734PL_rpeepp||5.013005|n
735PL_rsfp_filters|5.024000||p
736PL_rsfp|5.024000||p
737PL_rs|||n
738PL_signals|5.008001||p
739PL_stack_base|5.004050||p
740PL_stack_sp|5.004050||p
741PL_statcache|5.005000||p
742PL_stdingv|5.004050||p
743PL_sv_arenaroot|5.004050||p
744PL_sv_no|5.004050||pn
745PL_sv_undef|5.004050||pn
746PL_sv_yes|5.004050||pn
747PL_tainted|5.004050||p
748PL_tainting|5.004050||p
749PL_tokenbuf|5.024000||p
750POP_MULTICALL||5.024000|
751POPi|||n
752POPl|||n
753POPn|||n
754POPpbytex||5.007001|n
755POPpx||5.005030|n
756POPp|||n
757POPs|||n
758POPul||5.006000|n
759POPu||5.004000|n
760PTR2IV|5.006000||p
761PTR2NV|5.006000||p
762PTR2UV|5.006000||p
763PTR2nat|5.009003||p
764PTR2ul|5.007001||p
765PTRV|5.006000||p
766PUSHMARK|||
767PUSH_MULTICALL||5.024000|
768PUSHi|||
769PUSHmortal|5.009002||p
770PUSHn|||
771PUSHp|||
772PUSHs|||
773PUSHu|5.004000||p
774PUTBACK|||
775PadARRAY||5.024000|
776PadMAX||5.024000|
777PadlistARRAY||5.024000|
778PadlistMAX||5.024000|
779PadlistNAMESARRAY||5.024000|
780PadlistNAMESMAX||5.024000|
781PadlistNAMES||5.024000|
782PadlistREFCNT||5.017004|
783PadnameIsOUR|||
784PadnameIsSTATE|||
785PadnameLEN||5.024000|
786PadnameOURSTASH|||
787PadnameOUTER|||
788PadnamePV||5.024000|
789PadnameREFCNT_dec||5.024000|
790PadnameREFCNT||5.024000|
791PadnameSV||5.024000|
792PadnameTYPE|||
793PadnameUTF8||5.021007|
794PadnamelistARRAY||5.024000|
795PadnamelistMAX||5.024000|
796PadnamelistREFCNT_dec||5.024000|
797PadnamelistREFCNT||5.024000|
798PerlIO_clearerr||5.007003|
799PerlIO_close||5.007003|
800PerlIO_context_layers||5.009004|
801PerlIO_eof||5.007003|
802PerlIO_error||5.007003|
803PerlIO_fileno||5.007003|
804PerlIO_fill||5.007003|
805PerlIO_flush||5.007003|
806PerlIO_get_base||5.007003|
807PerlIO_get_bufsiz||5.007003|
808PerlIO_get_cnt||5.007003|
809PerlIO_get_ptr||5.007003|
810PerlIO_read||5.007003|
811PerlIO_restore_errno|||
812PerlIO_save_errno|||
813PerlIO_seek||5.007003|
814PerlIO_set_cnt||5.007003|
815PerlIO_set_ptrcnt||5.007003|
816PerlIO_setlinebuf||5.007003|
817PerlIO_stderr||5.007003|
818PerlIO_stdin||5.007003|
819PerlIO_stdout||5.007003|
820PerlIO_tell||5.007003|
821PerlIO_unread||5.007003|
822PerlIO_write||5.007003|
823Perl_signbit||5.009005|n
824PoisonFree|5.009004||p
825PoisonNew|5.009004||p
826PoisonWith|5.009004||p
827Poison|5.008000||p
828READ_XDIGIT||5.017006|
829RESTORE_LC_NUMERIC||5.024000|
830RETVAL|||n
831Renewc|||
832Renew|||
833SAVECLEARSV|||
834SAVECOMPPAD|||
835SAVEPADSV|||
836SAVETMPS|||
837SAVE_DEFSV|5.004050||p
838SPAGAIN|||
839SP|||
840START_EXTERN_C|5.005000||p
841START_MY_CXT|5.007003||p
842STMT_END|||p
843STMT_START|||p
844STORE_LC_NUMERIC_FORCE_TO_UNDERLYING||5.024000|
845STORE_LC_NUMERIC_SET_TO_NEEDED||5.024000|
846STR_WITH_LEN|5.009003||p
847ST|||
848SV_CONST_RETURN|5.009003||p
849SV_COW_DROP_PV|5.008001||p
850SV_COW_SHARED_HASH_KEYS|5.009005||p
851SV_GMAGIC|5.007002||p
852SV_HAS_TRAILING_NUL|5.009004||p
853SV_IMMEDIATE_UNREF|5.007001||p
854SV_MUTABLE_RETURN|5.009003||p
855SV_NOSTEAL|5.009002||p
856SV_SMAGIC|5.009003||p
857SV_UTF8_NO_ENCODING|5.008001||p
858SVfARG|5.009005||p
859SVf_UTF8|5.006000||p
860SVf|5.006000||p
861SVt_INVLIST||5.019002|
862SVt_IV|||
863SVt_NULL|||
864SVt_NV|||
865SVt_PVAV|||
866SVt_PVCV|||
867SVt_PVFM|||
868SVt_PVGV|||
869SVt_PVHV|||
870SVt_PVIO|||
871SVt_PVIV|||
872SVt_PVLV|||
873SVt_PVMG|||
874SVt_PVNV|||
875SVt_PV|||
876SVt_REGEXP||5.011000|
877Safefree|||
878Slab_Alloc|||
879Slab_Free|||
880Slab_to_ro|||
881Slab_to_rw|||
882StructCopy|||
883SvCUR_set|||
884SvCUR|||
885SvEND|||
886SvGAMAGIC||5.006001|
887SvGETMAGIC|5.004050||p
888SvGROW|||
889SvIOK_UV||5.006000|
890SvIOK_notUV||5.006000|
891SvIOK_off|||
892SvIOK_only_UV||5.006000|
893SvIOK_only|||
894SvIOK_on|||
895SvIOKp|||
896SvIOK|||
897SvIVX|||
898SvIV_nomg|5.009001||p
899SvIV_set|||
900SvIVx|||
901SvIV|||
902SvIsCOW_shared_hash||5.008003|
903SvIsCOW||5.008003|
904SvLEN_set|||
905SvLEN|||
906SvLOCK||5.007003|
907SvMAGIC_set|5.009003||p
908SvNIOK_off|||
909SvNIOKp|||
910SvNIOK|||
911SvNOK_off|||
912SvNOK_only|||
913SvNOK_on|||
914SvNOKp|||
915SvNOK|||
916SvNVX|||
917SvNV_nomg||5.013002|
918SvNV_set|||
919SvNVx|||
920SvNV|||
921SvOK|||
922SvOOK_offset||5.011000|
923SvOOK|||
924SvPOK_off|||
925SvPOK_only_UTF8||5.006000|
926SvPOK_only|||
927SvPOK_on|||
928SvPOKp|||
929SvPOK|||
930SvPVX_const|5.009003||p
931SvPVX_mutable|5.009003||p
932SvPVX|||
933SvPV_const|5.009003||p
934SvPV_flags_const_nolen|5.009003||p
935SvPV_flags_const|5.009003||p
936SvPV_flags_mutable|5.009003||p
937SvPV_flags|5.007002||p
938SvPV_force_flags_mutable|5.009003||p
939SvPV_force_flags_nolen|5.009003||p
940SvPV_force_flags|5.007002||p
941SvPV_force_mutable|5.009003||p
942SvPV_force_nolen|5.009003||p
943SvPV_force_nomg_nolen|5.009003||p
944SvPV_force_nomg|5.007002||p
945SvPV_force|||p
946SvPV_mutable|5.009003||p
947SvPV_nolen_const|5.009003||p
948SvPV_nolen|5.006000||p
949SvPV_nomg_const_nolen|5.009003||p
950SvPV_nomg_const|5.009003||p
951SvPV_nomg_nolen|5.013007||p
952SvPV_nomg|5.007002||p
953SvPV_renew|5.009003||p
954SvPV_set|||
955SvPVbyte_force||5.009002|
956SvPVbyte_nolen||5.006000|
957SvPVbytex_force||5.006000|
958SvPVbytex||5.006000|
959SvPVbyte|5.006000||p
960SvPVutf8_force||5.006000|
961SvPVutf8_nolen||5.006000|
962SvPVutf8x_force||5.006000|
963SvPVutf8x||5.006000|
964SvPVutf8||5.006000|
965SvPVx|||
966SvPV|||
967SvREFCNT_dec_NN||5.017007|
968SvREFCNT_dec|||
969SvREFCNT_inc_NN|5.009004||p
970SvREFCNT_inc_simple_NN|5.009004||p
971SvREFCNT_inc_simple_void_NN|5.009004||p
972SvREFCNT_inc_simple_void|5.009004||p
973SvREFCNT_inc_simple|5.009004||p
974SvREFCNT_inc_void_NN|5.009004||p
975SvREFCNT_inc_void|5.009004||p
976SvREFCNT_inc|||p
977SvREFCNT|||
978SvROK_off|||
979SvROK_on|||
980SvROK|||
981SvRV_set|5.009003||p
982SvRV|||
983SvRXOK|5.009005||p
984SvRX|5.009005||p
985SvSETMAGIC|||
986SvSHARED_HASH|5.009003||p
987SvSHARE||5.007003|
988SvSTASH_set|5.009003||p
989SvSTASH|||
990SvSetMagicSV_nosteal||5.004000|
991SvSetMagicSV||5.004000|
992SvSetSV_nosteal||5.004000|
993SvSetSV|||
994SvTAINTED_off||5.004000|
995SvTAINTED_on||5.004000|
996SvTAINTED||5.004000|
997SvTAINT|||
998SvTHINKFIRST|||
999SvTRUE_nomg||5.013006|
1000SvTRUE|||
1001SvTYPE|||
1002SvUNLOCK||5.007003|
1003SvUOK|5.007001|5.006000|p
1004SvUPGRADE|||
1005SvUTF8_off||5.006000|
1006SvUTF8_on||5.006000|
1007SvUTF8||5.006000|
1008SvUVXx|5.004000||p
1009SvUVX|5.004000||p
1010SvUV_nomg|5.009001||p
1011SvUV_set|5.009003||p
1012SvUVx|5.004000||p
1013SvUV|5.004000||p
1014SvVOK||5.008001|
1015SvVSTRING_mg|5.009004||p
1016THIS|||n
1017UNDERBAR|5.009002||p
1018UTF8SKIP||5.006000|
1019UTF8_MAXBYTES|5.009002||p
1020UVCHR_SKIP||5.022000|
1021UVSIZE|5.006000||p
1022UVTYPE|5.006000||p
1023UVXf|5.007001||p
1024UVof|5.006000||p
1025UVuf|5.006000||p
1026UVxf|5.006000||p
1027WARN_ALL|5.006000||p
1028WARN_AMBIGUOUS|5.006000||p
1029WARN_ASSERTIONS|5.024000||p
1030WARN_BAREWORD|5.006000||p
1031WARN_CLOSED|5.006000||p
1032WARN_CLOSURE|5.006000||p
1033WARN_DEBUGGING|5.006000||p
1034WARN_DEPRECATED|5.006000||p
1035WARN_DIGIT|5.006000||p
1036WARN_EXEC|5.006000||p
1037WARN_EXITING|5.006000||p
1038WARN_GLOB|5.006000||p
1039WARN_INPLACE|5.006000||p
1040WARN_INTERNAL|5.006000||p
1041WARN_IO|5.006000||p
1042WARN_LAYER|5.008000||p
1043WARN_MALLOC|5.006000||p
1044WARN_MISC|5.006000||p
1045WARN_NEWLINE|5.006000||p
1046WARN_NUMERIC|5.006000||p
1047WARN_ONCE|5.006000||p
1048WARN_OVERFLOW|5.006000||p
1049WARN_PACK|5.006000||p
1050WARN_PARENTHESIS|5.006000||p
1051WARN_PIPE|5.006000||p
1052WARN_PORTABLE|5.006000||p
1053WARN_PRECEDENCE|5.006000||p
1054WARN_PRINTF|5.006000||p
1055WARN_PROTOTYPE|5.006000||p
1056WARN_QW|5.006000||p
1057WARN_RECURSION|5.006000||p
1058WARN_REDEFINE|5.006000||p
1059WARN_REGEXP|5.006000||p
1060WARN_RESERVED|5.006000||p
1061WARN_SEMICOLON|5.006000||p
1062WARN_SEVERE|5.006000||p
1063WARN_SIGNAL|5.006000||p
1064WARN_SUBSTR|5.006000||p
1065WARN_SYNTAX|5.006000||p
1066WARN_TAINT|5.006000||p
1067WARN_THREADS|5.008000||p
1068WARN_UNINITIALIZED|5.006000||p
1069WARN_UNOPENED|5.006000||p
1070WARN_UNPACK|5.006000||p
1071WARN_UNTIE|5.006000||p
1072WARN_UTF8|5.006000||p
1073WARN_VOID|5.006000||p
1074WIDEST_UTYPE|5.015004||p
1075XCPT_CATCH|5.009002||p
1076XCPT_RETHROW|5.009002||p
1077XCPT_TRY_END|5.009002||p
1078XCPT_TRY_START|5.009002||p
1079XPUSHi|||
1080XPUSHmortal|5.009002||p
1081XPUSHn|||
1082XPUSHp|||
1083XPUSHs|||
1084XPUSHu|5.004000||p
1085XSPROTO|5.010000||p
1086XSRETURN_EMPTY|||
1087XSRETURN_IV|||
1088XSRETURN_NO|||
1089XSRETURN_NV|||
1090XSRETURN_PV|||
1091XSRETURN_UNDEF|||
1092XSRETURN_UV|5.008001||p
1093XSRETURN_YES|||
1094XSRETURN|||p
1095XST_mIV|||
1096XST_mNO|||
1097XST_mNV|||
1098XST_mPV|||
1099XST_mUNDEF|||
1100XST_mUV|5.008001||p
1101XST_mYES|||
1102XS_APIVERSION_BOOTCHECK||5.024000|
1103XS_EXTERNAL||5.024000|
1104XS_INTERNAL||5.024000|
1105XS_VERSION_BOOTCHECK||5.024000|
1106XS_VERSION|||
1107XSprePUSH|5.006000||p
1108XS|||
1109XopDISABLE||5.024000|
1110XopENABLE||5.024000|
1111XopENTRYCUSTOM||5.024000|
1112XopENTRY_set||5.024000|
1113XopENTRY||5.024000|
1114XopFLAGS||5.013007|
1115ZeroD|5.009002||p
1116Zero|||
1117_aMY_CXT|5.007003||p
1118_add_range_to_invlist|||
1119_append_range_to_invlist|||
1120_core_swash_init|||
1121_get_encoding|||
1122_get_regclass_nonbitmap_data|||
1123_get_swash_invlist|||
1124_invlistEQ|||
1125_invlist_array_init|||n
1126_invlist_contains_cp|||n
1127_invlist_dump|||
1128_invlist_intersection_maybe_complement_2nd|||
1129_invlist_intersection|||
1130_invlist_invert|||
1131_invlist_len|||n
1132_invlist_populate_swatch|||n
1133_invlist_search|||n
1134_invlist_subtract|||
1135_invlist_union_maybe_complement_2nd|||
1136_invlist_union|||
1137_is_cur_LC_category_utf8|||
1138_is_in_locale_category||5.021001|
1139_is_uni_FOO||5.017008|
1140_is_uni_perl_idcont||5.017008|
1141_is_uni_perl_idstart||5.017007|
1142_is_utf8_FOO||5.017008|
1143_is_utf8_char_slow||5.021001|n
1144_is_utf8_idcont||5.021001|
1145_is_utf8_idstart||5.021001|
1146_is_utf8_mark||5.017008|
1147_is_utf8_perl_idcont||5.017008|
1148_is_utf8_perl_idstart||5.017007|
1149_is_utf8_xidcont||5.021001|
1150_is_utf8_xidstart||5.021001|
1151_load_PL_utf8_foldclosures|||
1152_make_exactf_invlist|||
1153_new_invlist_C_array|||
1154_new_invlist|||
1155_pMY_CXT|5.007003||p
1156_setlocale_debug_string|||n
1157_setup_canned_invlist|||
1158_swash_inversion_hash|||
1159_swash_to_invlist|||
1160_to_fold_latin1|||
1161_to_uni_fold_flags||5.014000|
1162_to_upper_title_latin1|||
1163_to_utf8_case|||
1164_to_utf8_fold_flags||5.019009|
1165_to_utf8_lower_flags||5.019009|
1166_to_utf8_title_flags||5.019009|
1167_to_utf8_upper_flags||5.019009|
1168_warn_problematic_locale|||n
1169aMY_CXT_|5.007003||p
1170aMY_CXT|5.007003||p
1171aTHXR_|5.024000||p
1172aTHXR|5.024000||p
1173aTHX_|5.006000||p
1174aTHX|5.006000||p
1175add_above_Latin1_folds|||
1176add_cp_to_invlist|||
1177add_data|||n
1178add_multi_match|||
1179add_utf16_textfilter|||
1180adjust_size_and_find_bucket|||n
1181advance_one_LB|||
1182advance_one_SB|||
1183advance_one_WB|||
1184alloc_maybe_populate_EXACT|||
1185alloccopstash|||
1186allocmy|||
1187amagic_call|||
1188amagic_cmp_locale|||
1189amagic_cmp|||
1190amagic_deref_call||5.013007|
1191amagic_i_ncmp|||
1192amagic_is_enabled|||
1193amagic_ncmp|||
1194anonymise_cv_maybe|||
1195any_dup|||
1196ao|||
1197append_utf8_from_native_byte||5.019004|n
1198apply_attrs_my|||
1199apply_attrs_string||5.006001|
1200apply_attrs|||
1201apply|||
1202assert_uft8_cache_coherent|||
1203assignment_type|||
1204atfork_lock||5.007003|n
1205atfork_unlock||5.007003|n
1206av_arylen_p||5.009003|
1207av_clear|||
1208av_create_and_push||5.009005|
1209av_create_and_unshift_one||5.009005|
1210av_delete||5.006000|
1211av_exists||5.006000|
1212av_extend_guts|||
1213av_extend|||
1214av_fetch|||
1215av_fill|||
1216av_iter_p||5.011000|
1217av_len|||
1218av_make|||
1219av_pop|||
1220av_push|||
1221av_reify|||
1222av_shift|||
1223av_store|||
1224av_tindex||5.017009|
1225av_top_index||5.017009|
1226av_undef|||
1227av_unshift|||
1228ax|||n
1229backup_one_LB|||
1230backup_one_SB|||
1231backup_one_WB|||
1232bad_type_gv|||
1233bad_type_pv|||
1234bind_match|||
1235block_end||5.004000|
1236block_gimme||5.004000|
1237block_start||5.004000|
1238blockhook_register||5.013003|
1239boolSV|5.004000||p
1240boot_core_PerlIO|||
1241boot_core_UNIVERSAL|||
1242boot_core_mro|||
1243bytes_cmp_utf8||5.013007|
1244bytes_from_utf8||5.007001|
1245bytes_to_utf8||5.006001|
1246cBOOL|5.013000||p
1247call_argv|5.006000||p
1248call_atexit||5.006000|
1249call_list||5.004000|
1250call_method|5.006000||p
1251call_pv|5.006000||p
1252call_sv|5.006000||p
1253caller_cx|5.013005|5.006000|p
1254calloc||5.007002|n
1255cando|||
1256cast_i32||5.006000|n
1257cast_iv||5.006000|n
1258cast_ulong||5.006000|n
1259cast_uv||5.006000|n
1260check_locale_boundary_crossing|||
1261check_type_and_open|||
1262check_uni|||
1263check_utf8_print|||
1264checkcomma|||
1265ckWARN|5.006000||p
1266ck_entersub_args_core|||
1267ck_entersub_args_list||5.013006|
1268ck_entersub_args_proto_or_list||5.013006|
1269ck_entersub_args_proto||5.013006|
1270ck_warner_d||5.011001|v
1271ck_warner||5.011001|v
1272ckwarn_common|||
1273ckwarn_d||5.009003|
1274ckwarn||5.009003|
1275clear_defarray||5.023008|
1276clear_placeholders|||
1277clear_special_blocks|||
1278clone_params_del|||n
1279clone_params_new|||n
1280closest_cop|||
1281cntrl_to_mnemonic|||n
1282compute_EXACTish|||n
1283construct_ahocorasick_from_trie|||
1284cop_fetch_label||5.015001|
1285cop_free|||
1286cop_hints_2hv||5.013007|
1287cop_hints_fetch_pvn||5.013007|
1288cop_hints_fetch_pvs||5.013007|
1289cop_hints_fetch_pv||5.013007|
1290cop_hints_fetch_sv||5.013007|
1291cop_store_label||5.015001|
1292cophh_2hv||5.013007|
1293cophh_copy||5.013007|
1294cophh_delete_pvn||5.013007|
1295cophh_delete_pvs||5.013007|
1296cophh_delete_pv||5.013007|
1297cophh_delete_sv||5.013007|
1298cophh_fetch_pvn||5.013007|
1299cophh_fetch_pvs||5.013007|
1300cophh_fetch_pv||5.013007|
1301cophh_fetch_sv||5.013007|
1302cophh_free||5.013007|
1303cophh_new_empty||5.024000|
1304cophh_store_pvn||5.013007|
1305cophh_store_pvs||5.013007|
1306cophh_store_pv||5.013007|
1307cophh_store_sv||5.013007|
1308core_prototype|||
1309coresub_op|||
1310cr_textfilter|||
1311create_eval_scope|||
1312croak_memory_wrap||5.019003|n
1313croak_no_mem|||n
1314croak_no_modify||5.013003|n
1315croak_nocontext|||vn
1316croak_popstack|||n
1317croak_sv||5.013001|
1318croak_xs_usage||5.010001|n
1319croak|||v
1320csighandler||5.009003|n
1321current_re_engine|||
1322curse|||
1323custom_op_desc||5.007003|
1324custom_op_get_field|||
1325custom_op_name||5.007003|
1326custom_op_register||5.013007|
1327custom_op_xop||5.013007|
1328cv_ckproto_len_flags|||
1329cv_clone_into|||
1330cv_clone|||
1331cv_const_sv_or_av|||n
1332cv_const_sv||5.003070|n
1333cv_dump|||
1334cv_forget_slab|||
1335cv_get_call_checker||5.013006|
1336cv_name||5.021005|
1337cv_set_call_checker_flags||5.021004|
1338cv_set_call_checker||5.013006|
1339cv_undef_flags|||
1340cv_undef|||
1341cvgv_from_hek|||
1342cvgv_set|||
1343cvstash_set|||
1344cx_dump||5.005000|
1345cx_dup|||
1346cx_popblock||5.023008|
1347cx_popeval||5.023008|
1348cx_popformat||5.023008|
1349cx_popgiven||5.023008|
1350cx_poploop||5.023008|
1351cx_popsub_args||5.023008|
1352cx_popsub_common||5.023008|
1353cx_popsub||5.023008|
1354cx_popwhen||5.023008|
1355cx_pushblock||5.023008|
1356cx_pusheval||5.023008|
1357cx_pushformat||5.023008|
1358cx_pushgiven||5.023008|
1359cx_pushloop_for||5.023008|
1360cx_pushloop_plain||5.023008|
1361cx_pushsub||5.023008|
1362cx_pushwhen||5.023008|
1363cx_topblock||5.023008|
1364cxinc|||
1365dAXMARK|5.009003||p
1366dAX|5.007002||p
1367dITEMS|5.007002||p
1368dMARK|||
1369dMULTICALL||5.009003|
1370dMY_CXT_SV|5.007003||p
1371dMY_CXT|5.007003||p
1372dNOOP|5.006000||p
1373dORIGMARK|||
1374dSP|||
1375dTHR|5.004050||p
1376dTHXR|5.024000||p
1377dTHXa|5.006000||p
1378dTHXoa|5.006000||p
1379dTHX|5.006000||p
1380dUNDERBAR|5.009002||p
1381dVAR|5.009003||p
1382dXCPT|5.009002||p
1383dXSARGS|||
1384dXSI32|||
1385dXSTARG|5.006000||p
1386deb_curcv|||
1387deb_nocontext|||vn
1388deb_stack_all|||
1389deb_stack_n|||
1390debop||5.005000|
1391debprofdump||5.005000|
1392debprof|||
1393debstackptrs||5.007003|
1394debstack||5.007003|
1395debug_start_match|||
1396deb||5.007003|v
1397defelem_target|||
1398del_sv|||
1399delete_eval_scope|||
1400delimcpy||5.004000|n
1401deprecate_commaless_var_list|||
1402despatch_signals||5.007001|
1403destroy_matcher|||
1404die_nocontext|||vn
1405die_sv||5.013001|
1406die_unwind|||
1407die|||v
1408dirp_dup|||
1409div128|||
1410djSP|||
1411do_aexec5|||
1412do_aexec|||
1413do_aspawn|||
1414do_binmode||5.004050|
1415do_chomp|||
1416do_close|||
1417do_delete_local|||
1418do_dump_pad|||
1419do_eof|||
1420do_exec3|||
1421do_execfree|||
1422do_exec|||
1423do_gv_dump||5.006000|
1424do_gvgv_dump||5.006000|
1425do_hv_dump||5.006000|
1426do_ipcctl|||
1427do_ipcget|||
1428do_join|||
1429do_magic_dump||5.006000|
1430do_msgrcv|||
1431do_msgsnd|||
1432do_ncmp|||
1433do_oddball|||
1434do_op_dump||5.006000|
1435do_open6|||
1436do_open9||5.006000|
1437do_open_raw|||
1438do_openn||5.007001|
1439do_open||5.003070|
1440do_pmop_dump||5.006000|
1441do_print|||
1442do_readline|||
1443do_seek|||
1444do_semop|||
1445do_shmio|||
1446do_smartmatch|||
1447do_spawn_nowait|||
1448do_spawn|||
1449do_sprintf|||
1450do_sv_dump||5.006000|
1451do_sysseek|||
1452do_tell|||
1453do_trans_complex_utf8|||
1454do_trans_complex|||
1455do_trans_count_utf8|||
1456do_trans_count|||
1457do_trans_simple_utf8|||
1458do_trans_simple|||
1459do_trans|||
1460do_vecget|||
1461do_vecset|||
1462do_vop|||
1463docatch|||
1464doeval_compile|||
1465dofile|||
1466dofindlabel|||
1467doform|||
1468doing_taint||5.008001|n
1469dooneliner|||
1470doopen_pm|||
1471doparseform|||
1472dopoptoeval|||
1473dopoptogivenfor|||
1474dopoptolabel|||
1475dopoptoloop|||
1476dopoptosub_at|||
1477dopoptowhen|||
1478doref||5.009003|
1479dounwind|||
1480dowantarray|||
1481drand48_init_r|||n
1482drand48_r|||n
1483dtrace_probe_call|||
1484dtrace_probe_load|||
1485dtrace_probe_op|||
1486dtrace_probe_phase|||
1487dump_all_perl|||
1488dump_all||5.006000|
1489dump_c_backtrace|||
1490dump_eval||5.006000|
1491dump_exec_pos|||
1492dump_form||5.006000|
1493dump_indent||5.006000|v
1494dump_mstats|||
1495dump_packsubs_perl|||
1496dump_packsubs||5.006000|
1497dump_sub_perl|||
1498dump_sub||5.006000|
1499dump_sv_child|||
1500dump_trie_interim_list|||
1501dump_trie_interim_table|||
1502dump_trie|||
1503dump_vindent||5.006000|
1504dumpuntil|||
1505dup_attrlist|||
1506edit_distance|||n
1507emulate_cop_io|||
1508eval_pv|5.006000||p
1509eval_sv|5.006000||p
1510exec_failed|||
1511expect_number|||
1512fbm_compile||5.005000|
1513fbm_instr||5.005000|
1514feature_is_enabled|||
1515filter_add|||
1516filter_del|||
1517filter_gets|||
1518filter_read|||
1519finalize_optree|||
1520finalize_op|||
1521find_and_forget_pmops|||
1522find_array_subscript|||
1523find_beginning|||
1524find_byclass|||
1525find_default_stash|||
1526find_hash_subscript|||
1527find_in_my_stash|||
1528find_lexical_cv|||
1529find_runcv_where|||
1530find_runcv||5.008001|
1531find_rundefsvoffset||5.009002|
1532find_rundefsv||5.013002|
1533find_script|||
1534find_uninit_var|||
1535first_symbol|||n
1536fixup_errno_string|||
1537foldEQ_latin1||5.013008|n
1538foldEQ_locale||5.013002|n
1539foldEQ_utf8_flags||5.013010|
1540foldEQ_utf8||5.013002|
1541foldEQ||5.013002|n
1542fold_constants|||
1543forbid_setid|||
1544force_ident_maybe_lex|||
1545force_ident|||
1546force_list|||
1547force_next|||
1548force_strict_version|||
1549force_version|||
1550force_word|||
1551forget_pmop|||
1552form_nocontext|||vn
1553form_short_octal_warning|||
1554form||5.004000|v
1555fp_dup|||
1556fprintf_nocontext|||vn
1557free_c_backtrace|||
1558free_global_struct|||
1559free_tied_hv_pool|||
1560free_tmps|||
1561gen_constant_list|||
1562get_ANYOF_cp_list_for_ssc|||
1563get_and_check_backslash_N_name|||
1564get_aux_mg|||
1565get_av|5.006000||p
1566get_c_backtrace_dump|||
1567get_c_backtrace|||
1568get_context||5.006000|n
1569get_cvn_flags|||
1570get_cvs|5.011000||p
1571get_cv|5.006000||p
1572get_db_sub|||
1573get_debug_opts|||
1574get_hash_seed|||
1575get_hv|5.006000||p
1576get_invlist_iter_addr|||n
1577get_invlist_offset_addr|||n
1578get_invlist_previous_index_addr|||n
1579get_mstats|||
1580get_no_modify|||
1581get_num|||
1582get_op_descs||5.005000|
1583get_op_names||5.005000|
1584get_opargs|||
1585get_ppaddr||5.006000|
1586get_re_arg|||
1587get_sv|5.006000||p
1588get_vtbl||5.005030|
1589getcwd_sv||5.007002|
1590getenv_len|||
1591glob_2number|||
1592glob_assign_glob|||
1593gp_dup|||
1594gp_free|||
1595gp_ref|||
1596grok_atoUV|||n
1597grok_bin|5.007003||p
1598grok_bslash_N|||
1599grok_bslash_c|||
1600grok_bslash_o|||
1601grok_bslash_x|||
1602grok_hex|5.007003||p
1603grok_infnan||5.021004|
1604grok_number_flags||5.021002|
1605grok_number|5.007002||p
1606grok_numeric_radix|5.007002||p
1607grok_oct|5.007003||p
1608group_end|||
1609gv_AVadd|||
1610gv_HVadd|||
1611gv_IOadd|||
1612gv_SVadd|||
1613gv_add_by_type||5.011000|
1614gv_autoload4||5.004000|
1615gv_autoload_pvn||5.015004|
1616gv_autoload_pv||5.015004|
1617gv_autoload_sv||5.015004|
1618gv_check|||
1619gv_const_sv||5.009003|
1620gv_dump||5.006000|
1621gv_efullname3||5.003070|
1622gv_efullname4||5.006001|
1623gv_efullname|||
1624gv_fetchfile_flags||5.009005|
1625gv_fetchfile|||
1626gv_fetchmeth_autoload||5.007003|
1627gv_fetchmeth_internal|||
1628gv_fetchmeth_pv_autoload||5.015004|
1629gv_fetchmeth_pvn_autoload||5.015004|
1630gv_fetchmeth_pvn||5.015004|
1631gv_fetchmeth_pv||5.015004|
1632gv_fetchmeth_sv_autoload||5.015004|
1633gv_fetchmeth_sv||5.015004|
1634gv_fetchmethod_autoload||5.004000|
1635gv_fetchmethod_pv_flags||5.015004|
1636gv_fetchmethod_pvn_flags||5.015004|
1637gv_fetchmethod_sv_flags||5.015004|
1638gv_fetchmethod|||
1639gv_fetchmeth|||
1640gv_fetchpvn_flags|5.009002||p
1641gv_fetchpvs|5.009004||p
1642gv_fetchpv|||
1643gv_fetchsv|||
1644gv_fullname3||5.003070|
1645gv_fullname4||5.006001|
1646gv_fullname|||
1647gv_handler||5.007001|
1648gv_init_pvn|||
1649gv_init_pv||5.015004|
1650gv_init_svtype|||
1651gv_init_sv||5.015004|
1652gv_init|||
1653gv_is_in_main|||
1654gv_magicalize_isa|||
1655gv_magicalize|||
1656gv_name_set||5.009004|
1657gv_override|||
1658gv_setref|||
1659gv_stashpvn_internal|||
1660gv_stashpvn|5.003070||p
1661gv_stashpvs|5.009003||p
1662gv_stashpv|||
1663gv_stashsvpvn_cached|||
1664gv_stashsv|||
1665gv_try_downgrade|||
1666handle_named_backref|||
1667handle_possible_posix|||
1668handle_regex_sets|||
1669he_dup|||
1670hek_dup|||
1671hfree_next_entry|||
1672hfreeentries|||
1673hsplit|||
1674hv_assert|||
1675hv_auxinit_internal|||n
1676hv_auxinit|||
1677hv_backreferences_p|||
1678hv_clear_placeholders||5.009001|
1679hv_clear|||
1680hv_common_key_len||5.010000|
1681hv_common||5.010000|
1682hv_copy_hints_hv||5.009004|
1683hv_delayfree_ent||5.004000|
1684hv_delete_common|||
1685hv_delete_ent||5.003070|
1686hv_delete|||
1687hv_eiter_p||5.009003|
1688hv_eiter_set||5.009003|
1689hv_ename_add|||
1690hv_ename_delete|||
1691hv_exists_ent||5.003070|
1692hv_exists|||
1693hv_fetch_ent||5.003070|
1694hv_fetchs|5.009003||p
1695hv_fetch|||
1696hv_fill||5.013002|
1697hv_free_ent_ret|||
1698hv_free_ent||5.004000|
1699hv_iterinit|||
1700hv_iterkeysv||5.003070|
1701hv_iterkey|||
1702hv_iternext_flags||5.008000|
1703hv_iternextsv|||
1704hv_iternext|||
1705hv_iterval|||
1706hv_kill_backrefs|||
1707hv_ksplit||5.003070|
1708hv_magic_check|||n
1709hv_magic|||
1710hv_name_set||5.009003|
1711hv_notallowed|||
1712hv_placeholders_get||5.009003|
1713hv_placeholders_p|||
1714hv_placeholders_set||5.009003|
1715hv_rand_set||5.018000|
1716hv_riter_p||5.009003|
1717hv_riter_set||5.009003|
1718hv_scalar||5.009001|
1719hv_store_ent||5.003070|
1720hv_store_flags||5.008000|
1721hv_stores|5.009004||p
1722hv_store|||
1723hv_undef_flags|||
1724hv_undef|||
1725ibcmp_locale||5.004000|
1726ibcmp_utf8||5.007003|
1727ibcmp|||
1728incline|||
1729incpush_if_exists|||
1730incpush_use_sep|||
1731incpush|||
1732ingroup|||
1733init_argv_symbols|||
1734init_constants|||
1735init_dbargs|||
1736init_debugger|||
1737init_global_struct|||
1738init_i18nl10n||5.006000|
1739init_i18nl14n||5.006000|
1740init_ids|||
1741init_interp|||
1742init_main_stash|||
1743init_perllib|||
1744init_postdump_symbols|||
1745init_predump_symbols|||
1746init_stacks||5.005000|
1747init_tm||5.007002|
1748inplace_aassign|||
1749instr|||n
1750intro_my||5.004000|
1751intuit_method|||
1752intuit_more|||
1753invert|||
1754invlist_array|||n
1755invlist_clear|||
1756invlist_clone|||
1757invlist_contents|||
1758invlist_extend|||
1759invlist_highest|||n
1760invlist_is_iterating|||n
1761invlist_iterfinish|||n
1762invlist_iterinit|||n
1763invlist_iternext|||n
1764invlist_max|||n
1765invlist_previous_index|||n
1766invlist_replace_list_destroys_src|||
1767invlist_set_len|||
1768invlist_set_previous_index|||n
1769invlist_trim|||n
1770invoke_exception_hook|||
1771io_close|||
1772isALNUMC|5.006000||p
1773isALNUM_lazy||5.021001|
1774isALPHANUMERIC||5.017008|
1775isALPHA|||
1776isASCII|5.006000||p
1777isBLANK|5.006001||p
1778isCNTRL|5.006000||p
1779isDIGIT|||
1780isFOO_lc|||
1781isFOO_utf8_lc|||
1782isGCB|||n
1783isGRAPH|5.006000||p
1784isIDCONT||5.017008|
1785isIDFIRST_lazy||5.021001|
1786isIDFIRST|||
1787isLB|||
1788isLOWER|||
1789isOCTAL||5.013005|
1790isPRINT|5.004000||p
1791isPSXSPC|5.006001||p
1792isPUNCT|5.006000||p
1793isSB|||
1794isSPACE|||
1795isUPPER|||
1796isUTF8_CHAR||5.021001|
1797isWB|||
1798isWORDCHAR||5.013006|
1799isXDIGIT|5.006000||p
1800is_an_int|||
1801is_ascii_string||5.011000|
1802is_handle_constructor|||n
1803is_invariant_string||5.021007|n
1804is_lvalue_sub||5.007001|
1805is_safe_syscall||5.019004|
1806is_ssc_worth_it|||n
1807is_uni_alnum_lc||5.006000|
1808is_uni_alnumc_lc||5.017007|
1809is_uni_alnumc||5.017007|
1810is_uni_alnum||5.006000|
1811is_uni_alpha_lc||5.006000|
1812is_uni_alpha||5.006000|
1813is_uni_ascii_lc||5.006000|
1814is_uni_ascii||5.006000|
1815is_uni_blank_lc||5.017002|
1816is_uni_blank||5.017002|
1817is_uni_cntrl_lc||5.006000|
1818is_uni_cntrl||5.006000|
1819is_uni_digit_lc||5.006000|
1820is_uni_digit||5.006000|
1821is_uni_graph_lc||5.006000|
1822is_uni_graph||5.006000|
1823is_uni_idfirst_lc||5.006000|
1824is_uni_idfirst||5.006000|
1825is_uni_lower_lc||5.006000|
1826is_uni_lower||5.006000|
1827is_uni_print_lc||5.006000|
1828is_uni_print||5.006000|
1829is_uni_punct_lc||5.006000|
1830is_uni_punct||5.006000|
1831is_uni_space_lc||5.006000|
1832is_uni_space||5.006000|
1833is_uni_upper_lc||5.006000|
1834is_uni_upper||5.006000|
1835is_uni_xdigit_lc||5.006000|
1836is_uni_xdigit||5.006000|
1837is_utf8_alnumc||5.017007|
1838is_utf8_alnum||5.006000|
1839is_utf8_alpha||5.006000|
1840is_utf8_ascii||5.006000|
1841is_utf8_blank||5.017002|
1842is_utf8_char_buf||5.015008|n
1843is_utf8_char||5.006000|n
1844is_utf8_cntrl||5.006000|
1845is_utf8_common|||
1846is_utf8_digit||5.006000|
1847is_utf8_graph||5.006000|
1848is_utf8_idcont||5.008000|
1849is_utf8_idfirst||5.006000|
1850is_utf8_lower||5.006000|
1851is_utf8_mark||5.006000|
1852is_utf8_perl_space||5.011001|
1853is_utf8_perl_word||5.011001|
1854is_utf8_posix_digit||5.011001|
1855is_utf8_print||5.006000|
1856is_utf8_punct||5.006000|
1857is_utf8_space||5.006000|
1858is_utf8_string_loclen||5.009003|n
1859is_utf8_string_loc||5.008001|n
1860is_utf8_string||5.006001|n
1861is_utf8_upper||5.006000|
1862is_utf8_xdigit||5.006000|
1863is_utf8_xidcont||5.013010|
1864is_utf8_xidfirst||5.013010|
1865isa_lookup|||
1866isinfnansv|||
1867isinfnan||5.021004|n
1868items|||n
1869ix|||n
1870jmaybe|||
1871join_exact|||
1872keyword_plugin_standard|||
1873keyword|||
1874leave_adjust_stacks||5.023008|
1875leave_scope|||
1876lex_bufutf8||5.011002|
1877lex_discard_to||5.011002|
1878lex_grow_linestr||5.011002|
1879lex_next_chunk||5.011002|
1880lex_peek_unichar||5.011002|
1881lex_read_space||5.011002|
1882lex_read_to||5.011002|
1883lex_read_unichar||5.011002|
1884lex_start||5.009005|
1885lex_stuff_pvn||5.011002|
1886lex_stuff_pvs||5.013005|
1887lex_stuff_pv||5.013006|
1888lex_stuff_sv||5.011002|
1889lex_unstuff||5.011002|
1890listkids|||
1891list|||
1892load_module_nocontext|||vn
1893load_module|5.006000||pv
1894localize|||
1895looks_like_bool|||
1896looks_like_number|||
1897lop|||
1898mPUSHi|5.009002||p
1899mPUSHn|5.009002||p
1900mPUSHp|5.009002||p
1901mPUSHs|5.010001||p
1902mPUSHu|5.009002||p
1903mXPUSHi|5.009002||p
1904mXPUSHn|5.009002||p
1905mXPUSHp|5.009002||p
1906mXPUSHs|5.010001||p
1907mXPUSHu|5.009002||p
1908magic_clear_all_env|||
1909magic_cleararylen_p|||
1910magic_clearenv|||
1911magic_clearhints|||
1912magic_clearhint|||
1913magic_clearisa|||
1914magic_clearpack|||
1915magic_clearsig|||
1916magic_copycallchecker|||
1917magic_dump||5.006000|
1918magic_existspack|||
1919magic_freearylen_p|||
1920magic_freeovrld|||
1921magic_getarylen|||
1922magic_getdebugvar|||
1923magic_getdefelem|||
1924magic_getnkeys|||
1925magic_getpack|||
1926magic_getpos|||
1927magic_getsig|||
1928magic_getsubstr|||
1929magic_gettaint|||
1930magic_getuvar|||
1931magic_getvec|||
1932magic_get|||
1933magic_killbackrefs|||
1934magic_methcall1|||
1935magic_methcall|||v
1936magic_methpack|||
1937magic_nextpack|||
1938magic_regdata_cnt|||
1939magic_regdatum_get|||
1940magic_regdatum_set|||
1941magic_scalarpack|||
1942magic_set_all_env|||
1943magic_setarylen|||
1944magic_setcollxfrm|||
1945magic_setdbline|||
1946magic_setdebugvar|||
1947magic_setdefelem|||
1948magic_setenv|||
1949magic_sethint|||
1950magic_setisa|||
1951magic_setlvref|||
1952magic_setmglob|||
1953magic_setnkeys|||
1954magic_setpack|||
1955magic_setpos|||
1956magic_setregexp|||
1957magic_setsig|||
1958magic_setsubstr|||
1959magic_settaint|||
1960magic_setutf8|||
1961magic_setuvar|||
1962magic_setvec|||
1963magic_set|||
1964magic_sizepack|||
1965magic_wipepack|||
1966make_matcher|||
1967make_trie|||
1968malloc_good_size|||n
1969malloced_size|||n
1970malloc||5.007002|n
1971markstack_grow||5.021001|
1972matcher_matches_sv|||
1973maybe_multimagic_gv|||
1974mayberelocate|||
1975measure_struct|||
1976memEQs|5.009005||p
1977memEQ|5.004000||p
1978memNEs|5.009005||p
1979memNE|5.004000||p
1980mem_collxfrm|||
1981mem_log_alloc|||n
1982mem_log_common|||n
1983mem_log_free|||n
1984mem_log_realloc|||n
1985mess_alloc|||
1986mess_nocontext|||vn
1987mess_sv||5.013001|
1988mess||5.006000|v
1989mfree||5.007002|n
1990mg_clear|||
1991mg_copy|||
1992mg_dup|||
1993mg_find_mglob|||
1994mg_findext|5.013008||pn
1995mg_find|||n
1996mg_free_type||5.013006|
1997mg_free|||
1998mg_get|||
1999mg_length||5.005000|
2000mg_localize|||
2001mg_magical|||n
2002mg_set|||
2003mg_size||5.005000|
2004mini_mktime||5.007002|n
2005minus_v|||
2006missingterm|||
2007mode_from_discipline|||
2008modkids|||
2009more_bodies|||
2010more_sv|||
2011moreswitches|||
2012move_proto_attr|||
2013mro_clean_isarev|||
2014mro_gather_and_rename|||
2015mro_get_from_name||5.010001|
2016mro_get_linear_isa_dfs|||
2017mro_get_linear_isa||5.009005|
2018mro_get_private_data||5.010001|
2019mro_isa_changed_in|||
2020mro_meta_dup|||
2021mro_meta_init|||
2022mro_method_changed_in||5.009005|
2023mro_package_moved|||
2024mro_register||5.010001|
2025mro_set_mro||5.010001|
2026mro_set_private_data||5.010001|
2027mul128|||
2028mulexp10|||n
2029multideref_stringify|||
2030my_atof2||5.007002|
2031my_atof||5.006000|
2032my_attrs|||
2033my_bcopy||5.004050|n
2034my_bytes_to_utf8|||n
2035my_bzero|||n
2036my_chsize|||
2037my_clearenv|||
2038my_cxt_index|||
2039my_cxt_init|||
2040my_dirfd||5.009005|n
2041my_exit_jump|||
2042my_exit|||
2043my_failure_exit||5.004000|
2044my_fflush_all||5.006000|
2045my_fork||5.007003|n
2046my_kid|||
2047my_lstat_flags|||
2048my_lstat||5.024000|
2049my_memcmp|||n
2050my_memset|||n
2051my_pclose||5.003070|
2052my_popen_list||5.007001|
2053my_popen||5.003070|
2054my_setenv|||
2055my_setlocale|||
2056my_snprintf|5.009004||pvn
2057my_socketpair||5.007003|n
2058my_sprintf|5.009003||pvn
2059my_stat_flags|||
2060my_stat||5.024000|
2061my_strerror||5.021001|
2062my_strftime||5.007002|
2063my_strlcat|5.009004||pn
2064my_strlcpy|5.009004||pn
2065my_unexec|||
2066my_vsnprintf||5.009004|n
2067need_utf8|||n
2068newANONATTRSUB||5.006000|
2069newANONHASH|||
2070newANONLIST|||
2071newANONSUB|||
2072newASSIGNOP|||
2073newATTRSUB_x|||
2074newATTRSUB||5.006000|
2075newAVREF|||
2076newAV|||
2077newBINOP|||
2078newCONDOP|||
2079newCONSTSUB_flags||5.015006|
2080newCONSTSUB|5.004050||p
2081newCVREF|||
2082newDEFSVOP||5.021006|
2083newFORM|||
2084newFOROP||5.013007|
2085newGIVENOP||5.009003|
2086newGIVWHENOP|||
2087newGP|||
2088newGVOP|||
2089newGVREF|||
2090newGVgen_flags||5.015004|
2091newGVgen|||
2092newHVREF|||
2093newHVhv||5.005000|
2094newHV|||
2095newIO|||
2096newLISTOP|||
2097newLOGOP|||
2098newLOOPEX|||
2099newLOOPOP|||
2100newMETHOP_internal|||
2101newMETHOP_named||5.021005|
2102newMETHOP||5.021005|
2103newMYSUB||5.017004|
2104newNULLLIST|||
2105newOP|||
2106newPADNAMELIST||5.021007|n
2107newPADNAMEouter||5.021007|n
2108newPADNAMEpvn||5.021007|n
2109newPADOP|||
2110newPMOP|||
2111newPROG|||
2112newPVOP|||
2113newRANGE|||
2114newRV_inc|5.004000||p
2115newRV_noinc|5.004000||p
2116newRV|||
2117newSLICEOP|||
2118newSTATEOP|||
2119newSTUB|||
2120newSUB|||
2121newSVOP|||
2122newSVREF|||
2123newSV_type|5.009005||p
2124newSVavdefelem|||
2125newSVhek||5.009003|
2126newSViv|||
2127newSVnv|||
2128newSVpadname||5.017004|
2129newSVpv_share||5.013006|
2130newSVpvf_nocontext|||vn
2131newSVpvf||5.004000|v
2132newSVpvn_flags|5.010001||p
2133newSVpvn_share|5.007001||p
2134newSVpvn_utf8|5.010001||p
2135newSVpvn|5.004050||p
2136newSVpvs_flags|5.010001||p
2137newSVpvs_share|5.009003||p
2138newSVpvs|5.009003||p
2139newSVpv|||
2140newSVrv|||
2141newSVsv|||
2142newSVuv|5.006000||p
2143newSV|||
2144newUNOP_AUX||5.021007|
2145newUNOP|||
2146newWHENOP||5.009003|
2147newWHILEOP||5.013007|
2148newXS_deffile|||
2149newXS_flags||5.009004|
2150newXS_len_flags|||
2151newXSproto||5.006000|
2152newXS||5.006000|
2153new_collate||5.006000|
2154new_constant|||
2155new_ctype||5.006000|
2156new_he|||
2157new_logop|||
2158new_numeric||5.006000|
2159new_stackinfo||5.005000|
2160new_version||5.009000|
2161new_warnings_bitfield|||
2162next_symbol|||
2163nextargv|||
2164nextchar|||
2165ninstr|||n
2166no_bareword_allowed|||
2167no_fh_allowed|||
2168no_op|||
2169noperl_die|||vn
2170not_a_number|||
2171not_incrementable|||
2172nothreadhook||5.008000|
2173nuke_stacks|||
2174num_overflow|||n
2175oopsAV|||
2176oopsHV|||
2177op_append_elem||5.013006|
2178op_append_list||5.013006|
2179op_clear|||
2180op_contextualize||5.013006|
2181op_convert_list||5.021006|
2182op_dump||5.006000|
2183op_free|||
2184op_integerize|||
2185op_linklist||5.013006|
2186op_lvalue_flags|||
2187op_lvalue||5.013007|
2188op_null||5.007002|
2189op_parent|||n
2190op_prepend_elem||5.013006|
2191op_refcnt_dec|||
2192op_refcnt_inc|||
2193op_refcnt_lock||5.009002|
2194op_refcnt_unlock||5.009002|
2195op_relocate_sv|||
2196op_scope||5.013007|
2197op_sibling_splice||5.021002|n
2198op_std_init|||
2199op_unscope|||
2200open_script|||
2201openn_cleanup|||
2202openn_setup|||
2203opmethod_stash|||
2204opslab_force_free|||
2205opslab_free_nopad|||
2206opslab_free|||
2207output_or_return_posix_warnings|||
2208pMY_CXT_|5.007003||p
2209pMY_CXT|5.007003||p
2210pTHX_|5.006000||p
2211pTHX|5.006000||p
2212packWARN|5.007003||p
2213pack_cat||5.007003|
2214pack_rec|||
2215package_version|||
2216package|||
2217packlist||5.008001|
2218pad_add_anon||5.008001|
2219pad_add_name_pvn||5.015001|
2220pad_add_name_pvs||5.015001|
2221pad_add_name_pv||5.015001|
2222pad_add_name_sv||5.015001|
2223pad_add_weakref|||
2224pad_alloc_name|||
2225pad_alloc|||
2226pad_block_start|||
2227pad_check_dup|||
2228pad_compname_type||5.009003|
2229pad_findlex|||
2230pad_findmy_pvn||5.015001|
2231pad_findmy_pvs||5.015001|
2232pad_findmy_pv||5.015001|
2233pad_findmy_sv||5.015001|
2234pad_fixup_inner_anons|||
2235pad_free|||
2236pad_leavemy|||
2237pad_new||5.008001|
2238pad_push|||
2239pad_reset|||
2240pad_setsv|||
2241pad_sv|||
2242pad_swipe|||
2243pad_tidy||5.008001|
2244padlist_dup|||
2245padlist_store|||
2246padname_dup|||
2247padname_free|||
2248padnamelist_dup|||
2249padnamelist_fetch||5.021007|n
2250padnamelist_free|||
2251padnamelist_store||5.021007|
2252parse_arithexpr||5.013008|
2253parse_barestmt||5.013007|
2254parse_block||5.013007|
2255parse_body|||
2256parse_fullexpr||5.013008|
2257parse_fullstmt||5.013005|
2258parse_gv_stash_name|||
2259parse_ident|||
2260parse_label||5.013007|
2261parse_listexpr||5.013008|
2262parse_lparen_question_flags|||
2263parse_stmtseq||5.013006|
2264parse_subsignature|||
2265parse_termexpr||5.013008|
2266parse_unicode_opts|||
2267parser_dup|||
2268parser_free_nexttoke_ops|||
2269parser_free|||
2270path_is_searchable|||n
2271peep|||
2272pending_ident|||
2273perl_alloc_using|||n
2274perl_alloc|||n
2275perl_clone_using|||n
2276perl_clone|||n
2277perl_construct|||n
2278perl_destruct||5.007003|n
2279perl_free|||n
2280perl_parse||5.006000|n
2281perl_run|||n
2282pidgone|||
2283pm_description|||
2284pmop_dump||5.006000|
2285pmruntime|||
2286pmtrans|||
2287pop_scope|||
2288populate_ANYOF_from_invlist|||
2289populate_isa|||v
2290pregcomp||5.009005|
2291pregexec|||
2292pregfree2||5.011000|
2293pregfree|||
2294prescan_version||5.011004|
2295printbuf|||
2296printf_nocontext|||vn
2297process_special_blocks|||
2298ptr_hash|||n
2299ptr_table_clear||5.009005|
2300ptr_table_fetch||5.009005|
2301ptr_table_find|||n
2302ptr_table_free||5.009005|
2303ptr_table_new||5.009005|
2304ptr_table_split||5.009005|
2305ptr_table_store||5.009005|
2306push_scope|||
2307put_charclass_bitmap_innards_common|||
2308put_charclass_bitmap_innards_invlist|||
2309put_charclass_bitmap_innards|||
2310put_code_point|||
2311put_range|||
2312pv_display|5.006000||p
2313pv_escape|5.009004||p
2314pv_pretty|5.009004||p
2315pv_uni_display||5.007003|
2316qerror|||
2317qsortsvu|||
2318quadmath_format_needed|||n
2319quadmath_format_single|||n
2320re_compile||5.009005|
2321re_croak2|||
2322re_dup_guts|||
2323re_exec_indentf|||v
2324re_indentf|||v
2325re_intuit_start||5.019001|
2326re_intuit_string||5.006000|
2327re_op_compile|||
2328re_printf|||v
2329realloc||5.007002|n
2330reentrant_free||5.024000|
2331reentrant_init||5.024000|
2332reentrant_retry||5.024000|vn
2333reentrant_size||5.024000|
2334ref_array_or_hash|||
2335refcounted_he_chain_2hv|||
2336refcounted_he_fetch_pvn|||
2337refcounted_he_fetch_pvs|||
2338refcounted_he_fetch_pv|||
2339refcounted_he_fetch_sv|||
2340refcounted_he_free|||
2341refcounted_he_inc|||
2342refcounted_he_new_pvn|||
2343refcounted_he_new_pvs|||
2344refcounted_he_new_pv|||
2345refcounted_he_new_sv|||
2346refcounted_he_value|||
2347refkids|||
2348refto|||
2349ref||5.024000|
2350reg2Lanode|||
2351reg_check_named_buff_matched|||n
2352reg_named_buff_all||5.009005|
2353reg_named_buff_exists||5.009005|
2354reg_named_buff_fetch||5.009005|
2355reg_named_buff_firstkey||5.009005|
2356reg_named_buff_iter|||
2357reg_named_buff_nextkey||5.009005|
2358reg_named_buff_scalar||5.009005|
2359reg_named_buff|||
2360reg_node|||
2361reg_numbered_buff_fetch|||
2362reg_numbered_buff_length|||
2363reg_numbered_buff_store|||
2364reg_qr_package|||
2365reg_recode|||
2366reg_scan_name|||
2367reg_skipcomment|||n
2368reg_temp_copy|||
2369reganode|||
2370regatom|||
2371regbranch|||
2372regclass_swash||5.009004|
2373regclass|||
2374regcppop|||
2375regcppush|||
2376regcurly|||n
2377regdump_extflags|||
2378regdump_intflags|||
2379regdump||5.005000|
2380regdupe_internal|||
2381regex_set_precedence|||n
2382regexec_flags||5.005000|
2383regfree_internal||5.009005|
2384reghop3|||n
2385reghop4|||n
2386reghopmaybe3|||n
2387reginclass|||
2388reginitcolors||5.006000|
2389reginsert|||
2390regmatch|||
2391regnext||5.005000|
2392regnode_guts|||
2393regpiece|||
2394regprop|||
2395regrepeat|||
2396regtail_study|||
2397regtail|||
2398regtry|||
2399reg|||
2400repeatcpy|||n
2401report_evil_fh|||
2402report_redefined_cv|||
2403report_uninit|||
2404report_wrongway_fh|||
2405require_pv||5.006000|
2406require_tie_mod|||
2407restore_magic|||
2408rninstr|||n
2409rpeep|||
2410rsignal_restore|||
2411rsignal_save|||
2412rsignal_state||5.004000|
2413rsignal||5.004000|
2414run_body|||
2415run_user_filter|||
2416runops_debug||5.005000|
2417runops_standard||5.005000|
2418rv2cv_op_cv||5.013006|
2419rvpv_dup|||
2420rxres_free|||
2421rxres_restore|||
2422rxres_save|||
2423safesyscalloc||5.006000|n
2424safesysfree||5.006000|n
2425safesysmalloc||5.006000|n
2426safesysrealloc||5.006000|n
2427same_dirent|||
2428save_I16||5.004000|
2429save_I32|||
2430save_I8||5.006000|
2431save_adelete||5.011000|
2432save_aelem_flags||5.011000|
2433save_aelem||5.004050|
2434save_alloc||5.006000|
2435save_aptr|||
2436save_ary|||
2437save_bool||5.008001|
2438save_clearsv|||
2439save_delete|||
2440save_destructor_x||5.006000|
2441save_destructor||5.006000|
2442save_freeop|||
2443save_freepv|||
2444save_freesv|||
2445save_generic_pvref||5.006001|
2446save_generic_svref||5.005030|
2447save_gp||5.004000|
2448save_hash|||
2449save_hdelete||5.011000|
2450save_hek_flags|||n
2451save_helem_flags||5.011000|
2452save_helem||5.004050|
2453save_hints||5.010001|
2454save_hptr|||
2455save_int|||
2456save_item|||
2457save_iv||5.005000|
2458save_lines|||
2459save_list|||
2460save_long|||
2461save_magic_flags|||
2462save_mortalizesv||5.007001|
2463save_nogv|||
2464save_op||5.005000|
2465save_padsv_and_mortalize||5.010001|
2466save_pptr|||
2467save_pushi32ptr||5.010001|
2468save_pushptri32ptr|||
2469save_pushptrptr||5.010001|
2470save_pushptr||5.010001|
2471save_re_context||5.006000|
2472save_scalar_at|||
2473save_scalar|||
2474save_set_svflags||5.009000|
2475save_shared_pvref||5.007003|
2476save_sptr|||
2477save_strlen|||
2478save_svref|||
2479save_vptr||5.006000|
2480savepvn|||
2481savepvs||5.009003|
2482savepv|||
2483savesharedpvn||5.009005|
2484savesharedpvs||5.013006|
2485savesharedpv||5.007003|
2486savesharedsvpv||5.013006|
2487savestack_grow_cnt||5.008001|
2488savestack_grow|||
2489savesvpv||5.009002|
2490savetmps||5.023008|
2491sawparens|||
2492scalar_mod_type|||n
2493scalarboolean|||
2494scalarkids|||
2495scalarseq|||
2496scalarvoid|||
2497scalar|||
2498scan_bin||5.006000|
2499scan_commit|||
2500scan_const|||
2501scan_formline|||
2502scan_heredoc|||
2503scan_hex|||
2504scan_ident|||
2505scan_inputsymbol|||
2506scan_num||5.007001|
2507scan_oct|||
2508scan_pat|||
2509scan_str|||
2510scan_subst|||
2511scan_trans|||
2512scan_version||5.009001|
2513scan_vstring||5.009005|
2514scan_word|||
2515search_const|||
2516seed||5.008001|
2517sequence_num|||
2518set_ANYOF_arg|||
2519set_caret_X|||
2520set_context||5.006000|n
2521set_numeric_local||5.006000|
2522set_numeric_radix||5.006000|
2523set_numeric_standard||5.006000|
2524set_padlist|||n
2525setdefout|||
2526share_hek_flags|||
2527share_hek||5.004000|
2528should_warn_nl|||n
2529si_dup|||
2530sighandler|||n
2531simplify_sort|||
2532skip_to_be_ignored_text|||
2533skipspace_flags|||
2534softref2xv|||
2535sortcv_stacked|||
2536sortcv_xsub|||
2537sortcv|||
2538sortsv_flags||5.009003|
2539sortsv||5.007003|
2540space_join_names_mortal|||
2541ss_dup|||
2542ssc_add_range|||
2543ssc_and|||
2544ssc_anything|||
2545ssc_clear_locale|||n
2546ssc_cp_and|||
2547ssc_finalize|||
2548ssc_init|||
2549ssc_intersection|||
2550ssc_is_anything|||n
2551ssc_is_cp_posixl_init|||n
2552ssc_or|||
2553ssc_union|||
2554stack_grow|||
2555start_glob|||
2556start_subparse||5.004000|
2557stdize_locale|||
2558strEQ|||
2559strGE|||
2560strGT|||
2561strLE|||
2562strLT|||
2563strNE|||
2564str_to_version||5.006000|
2565strip_return|||
2566strnEQ|||
2567strnNE|||
2568study_chunk|||
2569sub_crush_depth|||
2570sublex_done|||
2571sublex_push|||
2572sublex_start|||
2573sv_2bool_flags||5.013006|
2574sv_2bool|||
2575sv_2cv|||
2576sv_2io|||
2577sv_2iuv_common|||
2578sv_2iuv_non_preserve|||
2579sv_2iv_flags||5.009001|
2580sv_2iv|||
2581sv_2mortal|||
2582sv_2num|||
2583sv_2nv_flags||5.013001|
2584sv_2pv_flags|5.007002||p
2585sv_2pv_nolen|5.006000||p
2586sv_2pvbyte_nolen|5.006000||p
2587sv_2pvbyte|5.006000||p
2588sv_2pvutf8_nolen||5.006000|
2589sv_2pvutf8||5.006000|
2590sv_2pv|||
2591sv_2uv_flags||5.009001|
2592sv_2uv|5.004000||p
2593sv_add_arena|||
2594sv_add_backref|||
2595sv_backoff|||n
2596sv_bless|||
2597sv_buf_to_ro|||
2598sv_buf_to_rw|||
2599sv_cat_decode||5.008001|
2600sv_catpv_flags||5.013006|
2601sv_catpv_mg|5.004050||p
2602sv_catpv_nomg||5.013006|
2603sv_catpvf_mg_nocontext|||pvn
2604sv_catpvf_mg|5.006000|5.004000|pv
2605sv_catpvf_nocontext|||vn
2606sv_catpvf||5.004000|v
2607sv_catpvn_flags||5.007002|
2608sv_catpvn_mg|5.004050||p
2609sv_catpvn_nomg|5.007002||p
2610sv_catpvn|||
2611sv_catpvs_flags||5.013006|
2612sv_catpvs_mg||5.013006|
2613sv_catpvs_nomg||5.013006|
2614sv_catpvs|5.009003||p
2615sv_catpv|||
2616sv_catsv_flags||5.007002|
2617sv_catsv_mg|5.004050||p
2618sv_catsv_nomg|5.007002||p
2619sv_catsv|||
2620sv_chop|||
2621sv_clean_all|||
2622sv_clean_objs|||
2623sv_clear|||
2624sv_cmp_flags||5.013006|
2625sv_cmp_locale_flags||5.013006|
2626sv_cmp_locale||5.004000|
2627sv_cmp|||
2628sv_collxfrm_flags||5.013006|
2629sv_collxfrm|||
2630sv_copypv_flags||5.017002|
2631sv_copypv_nomg||5.017002|
2632sv_copypv|||
2633sv_dec_nomg||5.013002|
2634sv_dec|||
2635sv_del_backref|||
2636sv_derived_from_pvn||5.015004|
2637sv_derived_from_pv||5.015004|
2638sv_derived_from_sv||5.015004|
2639sv_derived_from||5.004000|
2640sv_destroyable||5.010000|
2641sv_display|||
2642sv_does_pvn||5.015004|
2643sv_does_pv||5.015004|
2644sv_does_sv||5.015004|
2645sv_does||5.009004|
2646sv_dump|||
2647sv_dup_common|||
2648sv_dup_inc_multiple|||
2649sv_dup_inc|||
2650sv_dup|||
2651sv_eq_flags||5.013006|
2652sv_eq|||
2653sv_exp_grow|||
2654sv_force_normal_flags||5.007001|
2655sv_force_normal||5.006000|
2656sv_free2|||
2657sv_free_arenas|||
2658sv_free|||
2659sv_get_backrefs||5.021008|n
2660sv_gets||5.003070|
2661sv_grow|||
2662sv_i_ncmp|||
2663sv_inc_nomg||5.013002|
2664sv_inc|||
2665sv_insert_flags||5.010001|
2666sv_insert|||
2667sv_isa|||
2668sv_isobject|||
2669sv_iv||5.005000|
2670sv_kill_backrefs|||
2671sv_len_utf8_nomg|||
2672sv_len_utf8||5.006000|
2673sv_len|||
2674sv_magic_portable|5.024000|5.004000|p
2675sv_magicext_mglob|||
2676sv_magicext||5.007003|
2677sv_magic|||
2678sv_mortalcopy_flags|||
2679sv_mortalcopy|||
2680sv_ncmp|||
2681sv_newmortal|||
2682sv_newref|||
2683sv_nolocking||5.007003|
2684sv_nosharing||5.007003|
2685sv_nounlocking|||
2686sv_nv||5.005000|
2687sv_only_taint_gmagic|||n
2688sv_or_pv_pos_u2b|||
2689sv_peek||5.005000|
2690sv_pos_b2u_flags||5.019003|
2691sv_pos_b2u_midway|||
2692sv_pos_b2u||5.006000|
2693sv_pos_u2b_cached|||
2694sv_pos_u2b_flags||5.011005|
2695sv_pos_u2b_forwards|||n
2696sv_pos_u2b_midway|||n
2697sv_pos_u2b||5.006000|
2698sv_pvbyten_force||5.006000|
2699sv_pvbyten||5.006000|
2700sv_pvbyte||5.006000|
2701sv_pvn_force_flags|5.007002||p
2702sv_pvn_force|||
2703sv_pvn_nomg|5.007003|5.005000|p
2704sv_pvn||5.005000|
2705sv_pvutf8n_force||5.006000|
2706sv_pvutf8n||5.006000|
2707sv_pvutf8||5.006000|
2708sv_pv||5.006000|
2709sv_recode_to_utf8||5.007003|
2710sv_reftype|||
2711sv_ref||5.015004|
2712sv_replace|||
2713sv_report_used|||
2714sv_resetpvn|||
2715sv_reset|||
2716sv_rvweaken||5.006000|
2717sv_sethek|||
2718sv_setiv_mg|5.004050||p
2719sv_setiv|||
2720sv_setnv_mg|5.006000||p
2721sv_setnv|||
2722sv_setpv_mg|5.004050||p
2723sv_setpvf_mg_nocontext|||pvn
2724sv_setpvf_mg|5.006000|5.004000|pv
2725sv_setpvf_nocontext|||vn
2726sv_setpvf||5.004000|v
2727sv_setpviv_mg||5.008001|
2728sv_setpviv||5.008001|
2729sv_setpvn_mg|5.004050||p
2730sv_setpvn|||
2731sv_setpvs_mg||5.013006|
2732sv_setpvs|5.009004||p
2733sv_setpv|||
2734sv_setref_iv|||
2735sv_setref_nv|||
2736sv_setref_pvn|||
2737sv_setref_pvs||5.024000|
2738sv_setref_pv|||
2739sv_setref_uv||5.007001|
2740sv_setsv_cow|||
2741sv_setsv_flags||5.007002|
2742sv_setsv_mg|5.004050||p
2743sv_setsv_nomg|5.007002||p
2744sv_setsv|||
2745sv_setuv_mg|5.004050||p
2746sv_setuv|5.004000||p
2747sv_tainted||5.004000|
2748sv_taint||5.004000|
2749sv_true||5.005000|
2750sv_unglob|||
2751sv_uni_display||5.007003|
2752sv_unmagicext|5.013008||p
2753sv_unmagic|||
2754sv_unref_flags||5.007001|
2755sv_unref|||
2756sv_untaint||5.004000|
2757sv_upgrade|||
2758sv_usepvn_flags||5.009004|
2759sv_usepvn_mg|5.004050||p
2760sv_usepvn|||
2761sv_utf8_decode||5.006000|
2762sv_utf8_downgrade||5.006000|
2763sv_utf8_encode||5.006000|
2764sv_utf8_upgrade_flags_grow||5.011000|
2765sv_utf8_upgrade_flags||5.007002|
2766sv_utf8_upgrade_nomg||5.007002|
2767sv_utf8_upgrade||5.007001|
2768sv_uv|5.005000||p
2769sv_vcatpvf_mg|5.006000|5.004000|p
2770sv_vcatpvfn_flags||5.017002|
2771sv_vcatpvfn||5.004000|
2772sv_vcatpvf|5.006000|5.004000|p
2773sv_vsetpvf_mg|5.006000|5.004000|p
2774sv_vsetpvfn||5.004000|
2775sv_vsetpvf|5.006000|5.004000|p
2776svtype|||
2777swallow_bom|||
2778swash_fetch||5.007002|
2779swash_init||5.006000|
2780swash_scan_list_line|||
2781swatch_get|||
2782sync_locale||5.021004|
2783sys_init3||5.010000|n
2784sys_init||5.010000|n
2785sys_intern_clear|||
2786sys_intern_dup|||
2787sys_intern_init|||
2788sys_term||5.010000|n
2789taint_env|||
2790taint_proper|||
2791tied_method|||v
2792tmps_grow_p|||
2793toFOLD_utf8||5.019001|
2794toFOLD_uvchr||5.023009|
2795toFOLD||5.019001|
2796toLOWER_L1||5.019001|
2797toLOWER_LC||5.004000|
2798toLOWER_utf8||5.015007|
2799toLOWER_uvchr||5.023009|
2800toLOWER|||
2801toTITLE_utf8||5.015007|
2802toTITLE_uvchr||5.023009|
2803toTITLE||5.019001|
2804toUPPER_utf8||5.015007|
2805toUPPER_uvchr||5.023009|
2806toUPPER|||
2807to_byte_substr|||
2808to_lower_latin1|||n
2809to_uni_fold||5.007003|
2810to_uni_lower_lc||5.006000|
2811to_uni_lower||5.007003|
2812to_uni_title_lc||5.006000|
2813to_uni_title||5.007003|
2814to_uni_upper_lc||5.006000|
2815to_uni_upper||5.007003|
2816to_utf8_case||5.007003|
2817to_utf8_fold||5.015007|
2818to_utf8_lower||5.015007|
2819to_utf8_substr|||
2820to_utf8_title||5.015007|
2821to_utf8_upper||5.015007|
2822tokenize_use|||
2823tokeq|||
2824tokereport|||
2825too_few_arguments_pv|||
2826too_many_arguments_pv|||
2827translate_substr_offsets|||n
2828try_amagic_bin|||
2829try_amagic_un|||
2830uiv_2buf|||n
2831unlnk|||
2832unpack_rec|||
2833unpack_str||5.007003|
2834unpackstring||5.008001|
2835unreferenced_to_tmp_stack|||
2836unshare_hek_or_pvn|||
2837unshare_hek|||
2838unsharepvn||5.003070|
2839unwind_handler_stack|||
2840update_debugger_info|||
2841upg_version||5.009005|
2842usage|||
2843utf16_textfilter|||
2844utf16_to_utf8_reversed||5.006001|
2845utf16_to_utf8||5.006001|
2846utf8_distance||5.006000|
2847utf8_hop||5.006000|n
2848utf8_length||5.007001|
2849utf8_mg_len_cache_update|||
2850utf8_mg_pos_cache_update|||
2851utf8_to_bytes||5.006001|
2852utf8_to_uvchr_buf||5.015009|
2853utf8_to_uvchr||5.007001|
2854utf8_to_uvuni_buf||5.015009|
2855utf8_to_uvuni||5.007001|
2856utf8n_to_uvchr||5.007001|
2857utf8n_to_uvuni||5.007001|
2858utilize|||
2859uvchr_to_utf8_flags||5.007003|
2860uvchr_to_utf8||5.007001|
2861uvoffuni_to_utf8_flags||5.019004|
2862uvuni_to_utf8_flags||5.007003|
2863uvuni_to_utf8||5.007001|
2864valid_utf8_to_uvchr||5.015009|
2865valid_utf8_to_uvuni||5.015009|
2866validate_proto|||
2867validate_suid|||
2868varname|||
2869vcmp||5.009000|
2870vcroak||5.006000|
2871vdeb||5.007003|
2872vform||5.006000|
2873visit|||
2874vivify_defelem|||
2875vivify_ref|||
2876vload_module|5.006000||p
2877vmess||5.006000|
2878vnewSVpvf|5.006000|5.004000|p
2879vnormal||5.009002|
2880vnumify||5.009000|
2881vstringify||5.009000|
2882vverify||5.009003|
2883vwarner||5.006000|
2884vwarn||5.006000|
2885wait4pid|||
2886warn_nocontext|||vn
2887warn_sv||5.013001|
2888warner_nocontext|||vn
2889warner|5.006000|5.004000|pv
2890warn|||v
2891was_lvalue_sub|||
2892watch|||
2893whichsig_pvn||5.015004|
2894whichsig_pv||5.015004|
2895whichsig_sv||5.015004|
2896whichsig|||
2897win32_croak_not_implemented|||n
2898with_queued_errors|||
2899wrap_op_checker||5.015008|
2900write_to_stderr|||
2901xs_boot_epilog|||
2902xs_handshake|||vn
2903xs_version_bootcheck|||
2904yyerror_pvn|||
2905yyerror_pv|||
2906yyerror|||
2907yylex|||
2908yyparse|||
2909yyunlex|||
2910yywarn|||
2911);
2912
2913if (exists $opt{'list-unsupported'}) {
2914 my $f;
2915 for $f (sort { lc $a cmp lc $b } keys %API) {
2916 next unless $API{$f}{todo};
2917 print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
2918 }
2919 exit 0;
2920}
2921
2922# Scan for possible replacement candidates
2923
2924my(%replace, %need, %hints, %warnings, %depends);
2925my $replace = 0;
2926my($hint, $define, $function);
2927
2928sub find_api
2929{
2930 my $code = shift;
2931 $code =~ s{
2932 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
2933 | "[^"\\]*(?:\\.[^"\\]*)*"
2934 | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
2935 grep { exists $API{$_} } $code =~ /(\w+)/mg;
2936}
2937
2938while (<DATA>) {
2939 if ($hint) {
2940 my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
2941 if (m{^\s*\*\s(.*?)\s*$}) {
2942 for (@{$hint->[1]}) {
2943 $h->{$_} ||= ''; # suppress warning with older perls
2944 $h->{$_} .= "$1\n";
2945 }
2946 }
2947 else { undef $hint }
2948 }
2949
2950 $hint = [$1, [split /,?\s+/, $2]]
2951 if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
2952
2953 if ($define) {
2954 if ($define->[1] =~ /\\$/) {
2955 $define->[1] .= $_;
2956 }
2957 else {
2958 if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
2959 my @n = find_api($define->[1]);
2960 push @{$depends{$define->[0]}}, @n if @n
2961 }
2962 undef $define;
2963 }
2964 }
2965
2966 $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
2967
2968 if ($function) {
2969 if (/^}/) {
2970 if (exists $API{$function->[0]}) {
2971 my @n = find_api($function->[1]);
2972 push @{$depends{$function->[0]}}, @n if @n
2973 }
2974 undef $function;
2975 }
2976 else {
2977 $function->[1] .= $_;
2978 }
2979 }
2980
2981 $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
2982
2983 $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
2984 $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
2985 $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
2986 $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
2987
2988 if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
2989 my @deps = map { s/\s+//g; $_ } split /,/, $3;
2990 my $d;
2991 for $d (map { s/\s+//g; $_ } split /,/, $1) {
2992 push @{$depends{$d}}, @deps;
2993 }
2994 }
2995
2996 $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
2997}
2998
2999for (values %depends) {
3000 my %s;
3001 $_ = [sort grep !$s{$_}++, @$_];
3002}
3003
3004if (exists $opt{'api-info'}) {
3005 my $f;
3006 my $count = 0;
3007 my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
3008 for $f (sort { lc $a cmp lc $b } keys %API) {
3009 next unless $f =~ /$match/;
3010 print "\n=== $f ===\n\n";
3011 my $info = 0;
3012 if ($API{$f}{base} || $API{$f}{todo}) {
3013 my $base = format_version($API{$f}{base} || $API{$f}{todo});
3014 print "Supported at least starting from perl-$base.\n";
3015 $info++;
3016 }
3017 if ($API{$f}{provided}) {
3018 my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
3019 print "Support by $ppport provided back to perl-$todo.\n";
3020 print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
3021 print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
3022 print "\n$hints{$f}" if exists $hints{$f};
3023 print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
3024 $info++;
3025 }
3026 print "No portability information available.\n" unless $info;
3027 $count++;
3028 }
3029 $count or print "Found no API matching '$opt{'api-info'}'.";
3030 print "\n";
3031 exit 0;
3032}
3033
3034if (exists $opt{'list-provided'}) {
3035 my $f;
3036 for $f (sort { lc $a cmp lc $b } keys %API) {
3037 next unless $API{$f}{provided};
3038 my @flags;
3039 push @flags, 'explicit' if exists $need{$f};
3040 push @flags, 'depend' if exists $depends{$f};
3041 push @flags, 'hint' if exists $hints{$f};
3042 push @flags, 'warning' if exists $warnings{$f};
3043 my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
3044 print "$f$flags\n";
3045 }
3046 exit 0;
3047}
3048
3049my @files;
3050my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
3051my $srcext = join '|', map { quotemeta $_ } @srcext;
3052
3053if (@ARGV) {
3054 my %seen;
3055 for (@ARGV) {
3056 if (-e) {
3057 if (-f) {
3058 push @files, $_ unless $seen{$_}++;
3059 }
3060 else { warn "'$_' is not a file.\n" }
3061 }
3062 else {
3063 my @new = grep { -f } glob $_
3064 or warn "'$_' does not exist.\n";
3065 push @files, grep { !$seen{$_}++ } @new;
3066 }
3067 }
3068}
3069else {
3070 eval {
3071 require File::Find;
3072 File::Find::find(sub {
3073 $File::Find::name =~ /($srcext)$/i
3074 and push @files, $File::Find::name;
3075 }, '.');
3076 };
3077 if ($@) {
3078 @files = map { glob "*$_" } @srcext;
3079 }
3080}
3081
3082if (!@ARGV || $opt{filter}) {
3083 my(@in, @out);
3084 my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
3085 for (@files) {
3086 my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
3087 push @{ $out ? \@out : \@in }, $_;
3088 }
3089 if (@ARGV && @out) {
3090 warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
3091 }
3092 @files = @in;
3093}
3094
3095die "No input files given!\n" unless @files;
3096
3097my(%files, %global, %revreplace);
3098%revreplace = reverse %replace;
3099my $filename;
3100my $patch_opened = 0;
3101
3102for $filename (@files) {
3103 unless (open IN, "<$filename") {
3104 warn "Unable to read from $filename: $!\n";
3105 next;
3106 }
3107
3108 info("Scanning $filename ...");
3109
3110 my $c = do { local $/; <IN> };
3111 close IN;
3112
3113 my %file = (orig => $c, changes => 0);
3114
3115 # Temporarily remove C/XS comments and strings from the code
3116 my @ccom;
3117
3118 $c =~ s{
3119 ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
3120 | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
3121 | ( ^$HS*\#[^\r\n]*
3122 | "[^"\\]*(?:\\.[^"\\]*)*"
3123 | '[^'\\]*(?:\\.[^'\\]*)*'
3124 | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
3125 }{ defined $2 and push @ccom, $2;
3126 defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
3127
3128 $file{ccom} = \@ccom;
3129 $file{code} = $c;
3130 $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
3131
3132 my $func;
3133
3134 for $func (keys %API) {
3135 my $match = $func;
3136 $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3137 if ($c =~ /\b(?:Perl_)?($match)\b/) {
3138 $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3139 $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3140 if (exists $API{$func}{provided}) {
3141 $file{uses_provided}{$func}++;
3142 if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
3143 $file{uses}{$func}++;
3144 my @deps = rec_depend($func);
3145 if (@deps) {
3146 $file{uses_deps}{$func} = \@deps;
3147 for (@deps) {
3148 $file{uses}{$_} = 0 unless exists $file{uses}{$_};
3149 }
3150 }
3151 for ($func, @deps) {
3152 $file{needs}{$_} = 'static' if exists $need{$_};
3153 }
3154 }
3155 }
3156 if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
3157 if ($c =~ /\b$func\b/) {
3158 $file{uses_todo}{$func}++;
3159 }
3160 }
3161 }
3162 }
3163
3164 while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3165 if (exists $need{$2}) {
3166 $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
3167 }
3168 else { warning("Possibly wrong #define $1 in $filename") }
3169 }
3170
3171 for (qw(uses needs uses_todo needed_global needed_static)) {
3172 for $func (keys %{$file{$_}}) {
3173 push @{$global{$_}{$func}}, $filename;
3174 }
3175 }
3176
3177 $files{$filename} = \%file;
3178}
3179
3180# Globally resolve NEED_'s
3181my $need;
3182for $need (keys %{$global{needs}}) {
3183 if (@{$global{needs}{$need}} > 1) {
3184 my @targets = @{$global{needs}{$need}};
3185 my @t = grep $files{$_}{needed_global}{$need}, @targets;
3186 @targets = @t if @t;
3187 @t = grep /\.xs$/i, @targets;
3188 @targets = @t if @t;
3189 my $target = shift @targets;
3190 $files{$target}{needs}{$need} = 'global';
3191 for (@{$global{needs}{$need}}) {
3192 $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3193 }
3194 }
3195}
3196
3197for $filename (@files) {
3198 exists $files{$filename} or next;
3199
3200 info("=== Analyzing $filename ===");
3201
3202 my %file = %{$files{$filename}};
3203 my $func;
3204 my $c = $file{code};
3205 my $warnings = 0;
3206
3207 for $func (sort keys %{$file{uses_Perl}}) {
3208 if ($API{$func}{varargs}) {
3209 unless ($API{$func}{nothxarg}) {
3210 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3211 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3212 if ($changes) {
3213 warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3214 $file{changes} += $changes;
3215 }
3216 }
3217 }
3218 else {
3219 warning("Uses Perl_$func instead of $func");
3220 $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3221 {$func$1(}g);
3222 }
3223 }
3224
3225 for $func (sort keys %{$file{uses_replace}}) {
3226 warning("Uses $func instead of $replace{$func}");
3227 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3228 }
3229
3230 for $func (sort keys %{$file{uses_provided}}) {
3231 if ($file{uses}{$func}) {
3232 if (exists $file{uses_deps}{$func}) {
3233 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3234 }
3235 else {
3236 diag("Uses $func");
3237 }
3238 }
3239 $warnings += hint($func);
3240 }
3241
3242 unless ($opt{quiet}) {
3243 for $func (sort keys %{$file{uses_todo}}) {
3244 print "*** WARNING: Uses $func, which may not be portable below perl ",
3245 format_version($API{$func}{todo}), ", even with '$ppport'\n";
3246 $warnings++;
3247 }
3248 }
3249
3250 for $func (sort keys %{$file{needed_static}}) {
3251 my $message = '';
3252 if (not exists $file{uses}{$func}) {
3253 $message = "No need to define NEED_$func if $func is never used";
3254 }
3255 elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
3256 $message = "No need to define NEED_$func when already needed globally";
3257 }
3258 if ($message) {
3259 diag($message);
3260 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
3261 }
3262 }
3263
3264 for $func (sort keys %{$file{needed_global}}) {
3265 my $message = '';
3266 if (not exists $global{uses}{$func}) {
3267 $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
3268 }
3269 elsif (exists $file{needs}{$func}) {
3270 if ($file{needs}{$func} eq 'extern') {
3271 $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
3272 }
3273 elsif ($file{needs}{$func} eq 'static') {
3274 $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
3275 }
3276 }
3277 if ($message) {
3278 diag($message);
3279 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
3280 }
3281 }
3282
3283 $file{needs_inc_ppport} = keys %{$file{uses}};
3284
3285 if ($file{needs_inc_ppport}) {
3286 my $pp = '';
3287
3288 for $func (sort keys %{$file{needs}}) {
3289 my $type = $file{needs}{$func};
3290 next if $type eq 'extern';
3291 my $suffix = $type eq 'global' ? '_GLOBAL' : '';
3292 unless (exists $file{"needed_$type"}{$func}) {
3293 if ($type eq 'global') {
3294 diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
3295 }
3296 else {
3297 diag("File needs $func, adding static request");
3298 }
3299 $pp .= "#define NEED_$func$suffix\n";
3300 }
3301 }
3302
3303 if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
3304 $pp = '';
3305 $file{changes}++;
3306 }
3307
3308 unless ($file{has_inc_ppport}) {
3309 diag("Needs to include '$ppport'");
3310 $pp .= qq(#include "$ppport"\n)
3311 }
3312
3313 if ($pp) {
3314 $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
3315 || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
3316 || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
3317 || ($c =~ s/^/$pp/);
3318 }
3319 }
3320 else {
3321 if ($file{has_inc_ppport}) {
3322 diag("No need to include '$ppport'");
3323 $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
3324 }
3325 }
3326
3327 # put back in our C comments
3328 my $ix;
3329 my $cppc = 0;
3330 my @ccom = @{$file{ccom}};
3331 for $ix (0 .. $#ccom) {
3332 if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
3333 $cppc++;
3334 $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
3335 }
3336 else {
3337 $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
3338 }
3339 }
3340
3341 if ($cppc) {
3342 my $s = $cppc != 1 ? 's' : '';
3343 warning("Uses $cppc C++ style comment$s, which is not portable");
3344 }
3345
3346 my $s = $warnings != 1 ? 's' : '';
3347 my $warn = $warnings ? " ($warnings warning$s)" : '';
3348 info("Analysis completed$warn");
3349
3350 if ($file{changes}) {
3351 if (exists $opt{copy}) {
3352 my $newfile = "$filename$opt{copy}";
3353 if (-e $newfile) {
3354 error("'$newfile' already exists, refusing to write copy of '$filename'");
3355 }
3356 else {
3357 local *F;
3358 if (open F, ">$newfile") {
3359 info("Writing copy of '$filename' with changes to '$newfile'");
3360 print F $c;
3361 close F;
3362 }
3363 else {
3364 error("Cannot open '$newfile' for writing: $!");
3365 }
3366 }
3367 }
3368 elsif (exists $opt{patch} || $opt{changes}) {
3369 if (exists $opt{patch}) {
3370 unless ($patch_opened) {
3371 if (open PATCH, ">$opt{patch}") {
3372 $patch_opened = 1;
3373 }
3374 else {
3375 error("Cannot open '$opt{patch}' for writing: $!");
3376 delete $opt{patch};
3377 $opt{changes} = 1;
3378 goto fallback;
3379 }
3380 }
3381 mydiff(\*PATCH, $filename, $c);
3382 }
3383 else {
3384fallback:
3385 info("Suggested changes:");
3386 mydiff(\*STDOUT, $filename, $c);
3387 }
3388 }
3389 else {
3390 my $s = $file{changes} == 1 ? '' : 's';
3391 info("$file{changes} potentially required change$s detected");
3392 }
3393 }
3394 else {
3395 info("Looks good");
3396 }
3397}
3398
3399close PATCH if $patch_opened;
3400
3401exit 0;
3402
3403
3404sub try_use { eval "use @_;"; return $@ eq '' }
3405
3406sub mydiff
3407{
3408 local *F = shift;
3409 my($file, $str) = @_;
3410 my $diff;
3411
3412 if (exists $opt{diff}) {
3413 $diff = run_diff($opt{diff}, $file, $str);
3414 }
3415
3416 if (!defined $diff and try_use('Text::Diff')) {
3417 $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
3418 $diff = <<HEADER . $diff;
3419--- $file
3420+++ $file.patched
3421HEADER
3422 }
3423
3424 if (!defined $diff) {
3425 $diff = run_diff('diff -u', $file, $str);
3426 }
3427
3428 if (!defined $diff) {
3429 $diff = run_diff('diff', $file, $str);
3430 }
3431
3432 if (!defined $diff) {
3433 error("Cannot generate a diff. Please install Text::Diff or use --copy.");
3434 return;
3435 }
3436
3437 print F $diff;
3438}
3439
3440sub run_diff
3441{
3442 my($prog, $file, $str) = @_;
3443 my $tmp = 'dppptemp';
3444 my $suf = 'aaa';
3445 my $diff = '';
3446 local *F;
3447
3448 while (-e "$tmp.$suf") { $suf++ }
3449 $tmp = "$tmp.$suf";
3450
3451 if (open F, ">$tmp") {
3452 print F $str;
3453 close F;
3454
3455 if (open F, "$prog $file $tmp |") {
3456 while (<F>) {
3457 s/\Q$tmp\E/$file.patched/;
3458 $diff .= $_;
3459 }
3460 close F;
3461 unlink $tmp;
3462 return $diff;
3463 }
3464
3465 unlink $tmp;
3466 }
3467 else {
3468 error("Cannot open '$tmp' for writing: $!");
3469 }
3470
3471 return undef;
3472}
3473
3474sub rec_depend
3475{
3476 my($func, $seen) = @_;
3477 return () unless exists $depends{$func};
3478 $seen = {%{$seen||{}}};
3479 return () if $seen->{$func}++;
3480 my %s;
3481 grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
3482}
3483
3484sub parse_version
3485{
3486 my $ver = shift;
3487
3488 if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
3489 return ($1, $2, $3);
3490 }
3491 elsif ($ver !~ /^\d+\.[\d_]+$/) {
3492 die "cannot parse version '$ver'\n";
3493 }
3494
3495 $ver =~ s/_//g;
3496 $ver =~ s/$/000000/;
3497
3498 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3499
3500 $v = int $v;
3501 $s = int $s;
3502
3503 if ($r < 5 || ($r == 5 && $v < 6)) {
3504 if ($s % 10) {
3505 die "cannot parse version '$ver'\n";
3506 }
3507 }
3508
3509 return ($r, $v, $s);
3510}
3511
3512sub format_version
3513{
3514 my $ver = shift;
3515
3516 $ver =~ s/$/000000/;
3517 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3518
3519 $v = int $v;
3520 $s = int $s;
3521
3522 if ($r < 5 || ($r == 5 && $v < 6)) {
3523 if ($s % 10) {
3524 die "invalid version '$ver'\n";
3525 }
3526 $s /= 10;
3527
3528 $ver = sprintf "%d.%03d", $r, $v;
3529 $s > 0 and $ver .= sprintf "_%02d", $s;
3530
3531 return $ver;
3532 }
3533
3534 return sprintf "%d.%d.%d", $r, $v, $s;
3535}
3536
3537sub info
3538{
3539 $opt{quiet} and return;
3540 print @_, "\n";
3541}
3542
3543sub diag
3544{
3545 $opt{quiet} and return;
3546 $opt{diag} and print @_, "\n";
3547}
3548
3549sub warning
3550{
3551 $opt{quiet} and return;
3552 print "*** ", @_, "\n";
3553}
3554
3555sub error
3556{
3557 print "*** ERROR: ", @_, "\n";
3558}
3559
3560my %given_hints;
3561my %given_warnings;
3562sub hint
3563{
3564 $opt{quiet} and return;
3565 my $func = shift;
3566 my $rv = 0;
3567 if (exists $warnings{$func} && !$given_warnings{$func}++) {
3568 my $warn = $warnings{$func};
3569 $warn =~ s!^!*** !mg;
3570 print "*** WARNING: $func\n", $warn;
3571 $rv++;
3572 }
3573 if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
3574 my $hint = $hints{$func};
3575 $hint =~ s/^/ /mg;
3576 print " --- hint for $func ---\n", $hint;
3577 }
3578 $rv;
3579}
3580
3581sub usage
3582{
3583 my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
3584 my %M = ( 'I' => '*' );
3585 $usage =~ s/^\s*perl\s+\S+/$^X $0/;
3586 $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
3587
3588 print <<ENDUSAGE;
3589
3590Usage: $usage
3591
3592See perldoc $0 for details.
3593
3594ENDUSAGE
3595
3596 exit 2;
3597}
3598
3599sub strip
3600{
3601 my $self = do { local(@ARGV,$/)=($0); <> };
3602 my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
3603 $copy =~ s/^(?=\S+)/ /gms;
3604 $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
3605 $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
3606if (\@ARGV && \$ARGV[0] eq '--unstrip') {
3607 eval { require Devel::PPPort };
3608 \$@ and die "Cannot require Devel::PPPort, please install.\\n";
3609 if (eval \$Devel::PPPort::VERSION < $VERSION) {
3610 die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
3611 . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
3612 . "Please install a newer version, or --unstrip will not work.\\n";
3613 }
3614 Devel::PPPort::WriteFile(\$0);
3615 exit 0;
3616}
3617print <<END;
3618
3619Sorry, but this is a stripped version of \$0.
3620
3621To be able to use its original script and doc functionality,
3622please try to regenerate this file using:
3623
3624 \$^X \$0 --unstrip
3625
3626END
3627/ms;
3628 my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
3629 $c =~ s{
3630 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
3631 | ( "[^"\\]*(?:\\.[^"\\]*)*"
3632 | '[^'\\]*(?:\\.[^'\\]*)*' )
3633 | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
3634 $c =~ s!\s+$!!mg;
3635 $c =~ s!^$LF!!mg;
3636 $c =~ s!^\s*#\s*!#!mg;
3637 $c =~ s!^\s+!!mg;
3638
3639 open OUT, ">$0" or die "cannot strip $0: $!\n";
3640 print OUT "$pl$c\n";
3641
3642 exit 0;
3643}
3644
3645__DATA__
3646*/
3647
3648#ifndef _P_P_PORTABILITY_H_
3649#define _P_P_PORTABILITY_H_
3650
3651#ifndef DPPP_NAMESPACE
3652# define DPPP_NAMESPACE DPPP_
3653#endif
3654
3655#define DPPP_CAT2(x,y) CAT2(x,y)
3656#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
3657
3658#ifndef PERL_REVISION
3659# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
3660# define PERL_PATCHLEVEL_H_IMPLICIT
3661# include <patchlevel.h>
3662# endif
3663# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
3664# include <could_not_find_Perl_patchlevel.h>
3665# endif
3666# ifndef PERL_REVISION
3667# define PERL_REVISION (5)
3668 /* Replace: 1 */
3669# define PERL_VERSION PATCHLEVEL
3670# define PERL_SUBVERSION SUBVERSION
3671 /* Replace PERL_PATCHLEVEL with PERL_VERSION */
3672 /* Replace: 0 */
3673# endif
3674#endif
3675
3676#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
3677#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
3678
3679/* It is very unlikely that anyone will try to use this with Perl 6
3680 (or greater), but who knows.
3681 */
3682#if PERL_REVISION != 5
3683# error ppport.h only works with Perl version 5
3684#endif /* PERL_REVISION != 5 */
3685#ifndef dTHR
3686# define dTHR dNOOP
3687#endif
3688#ifndef dTHX
3689# define dTHX dNOOP
3690#endif
3691
3692#ifndef dTHXa
3693# define dTHXa(x) dNOOP
3694#endif
3695#ifndef pTHX
3696# define pTHX void
3697#endif
3698
3699#ifndef pTHX_
3700# define pTHX_
3701#endif
3702
3703#ifndef aTHX
3704# define aTHX
3705#endif
3706
3707#ifndef aTHX_
3708# define aTHX_
3709#endif
3710
3711#if (PERL_BCDVERSION < 0x5006000)
3712# ifdef USE_THREADS
3713# define aTHXR thr
3714# define aTHXR_ thr,
3715# else
3716# define aTHXR
3717# define aTHXR_
3718# endif
3719# define dTHXR dTHR
3720#else
3721# define aTHXR aTHX
3722# define aTHXR_ aTHX_
3723# define dTHXR dTHX
3724#endif
3725#ifndef dTHXoa
3726# define dTHXoa(x) dTHXa(x)
3727#endif
3728
3729#ifdef I_LIMITS
3730# include <limits.h>
3731#endif
3732
3733#ifndef PERL_UCHAR_MIN
3734# define PERL_UCHAR_MIN ((unsigned char)0)
3735#endif
3736
3737#ifndef PERL_UCHAR_MAX
3738# ifdef UCHAR_MAX
3739# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
3740# else
3741# ifdef MAXUCHAR
3742# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
3743# else
3744# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
3745# endif
3746# endif
3747#endif
3748
3749#ifndef PERL_USHORT_MIN
3750# define PERL_USHORT_MIN ((unsigned short)0)
3751#endif
3752
3753#ifndef PERL_USHORT_MAX
3754# ifdef USHORT_MAX
3755# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
3756# else
3757# ifdef MAXUSHORT
3758# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
3759# else
3760# ifdef USHRT_MAX
3761# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
3762# else
3763# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
3764# endif
3765# endif
3766# endif
3767#endif
3768
3769#ifndef PERL_SHORT_MAX
3770# ifdef SHORT_MAX
3771# define PERL_SHORT_MAX ((short)SHORT_MAX)
3772# else
3773# ifdef MAXSHORT /* Often used in <values.h> */
3774# define PERL_SHORT_MAX ((short)MAXSHORT)
3775# else
3776# ifdef SHRT_MAX
3777# define PERL_SHORT_MAX ((short)SHRT_MAX)
3778# else
3779# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
3780# endif
3781# endif
3782# endif
3783#endif
3784
3785#ifndef PERL_SHORT_MIN
3786# ifdef SHORT_MIN
3787# define PERL_SHORT_MIN ((short)SHORT_MIN)
3788# else
3789# ifdef MINSHORT
3790# define PERL_SHORT_MIN ((short)MINSHORT)
3791# else
3792# ifdef SHRT_MIN
3793# define PERL_SHORT_MIN ((short)SHRT_MIN)
3794# else
3795# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
3796# endif
3797# endif
3798# endif
3799#endif
3800
3801#ifndef PERL_UINT_MAX
3802# ifdef UINT_MAX
3803# define PERL_UINT_MAX ((unsigned int)UINT_MAX)
3804# else
3805# ifdef MAXUINT
3806# define PERL_UINT_MAX ((unsigned int)MAXUINT)
3807# else
3808# define PERL_UINT_MAX (~(unsigned int)0)
3809# endif
3810# endif
3811#endif
3812
3813#ifndef PERL_UINT_MIN
3814# define PERL_UINT_MIN ((unsigned int)0)
3815#endif
3816
3817#ifndef PERL_INT_MAX
3818# ifdef INT_MAX
3819# define PERL_INT_MAX ((int)INT_MAX)
3820# else
3821# ifdef MAXINT /* Often used in <values.h> */
3822# define PERL_INT_MAX ((int)MAXINT)
3823# else
3824# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
3825# endif
3826# endif
3827#endif
3828
3829#ifndef PERL_INT_MIN
3830# ifdef INT_MIN
3831# define PERL_INT_MIN ((int)INT_MIN)
3832# else
3833# ifdef MININT
3834# define PERL_INT_MIN ((int)MININT)
3835# else
3836# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
3837# endif
3838# endif
3839#endif
3840
3841#ifndef PERL_ULONG_MAX
3842# ifdef ULONG_MAX
3843# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
3844# else
3845# ifdef MAXULONG
3846# define PERL_ULONG_MAX ((unsigned long)MAXULONG)
3847# else
3848# define PERL_ULONG_MAX (~(unsigned long)0)
3849# endif
3850# endif
3851#endif
3852
3853#ifndef PERL_ULONG_MIN
3854# define PERL_ULONG_MIN ((unsigned long)0L)
3855#endif
3856
3857#ifndef PERL_LONG_MAX
3858# ifdef LONG_MAX
3859# define PERL_LONG_MAX ((long)LONG_MAX)
3860# else
3861# ifdef MAXLONG
3862# define PERL_LONG_MAX ((long)MAXLONG)
3863# else
3864# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
3865# endif
3866# endif
3867#endif
3868
3869#ifndef PERL_LONG_MIN
3870# ifdef LONG_MIN
3871# define PERL_LONG_MIN ((long)LONG_MIN)
3872# else
3873# ifdef MINLONG
3874# define PERL_LONG_MIN ((long)MINLONG)
3875# else
3876# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
3877# endif
3878# endif
3879#endif
3880
3881#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
3882# ifndef PERL_UQUAD_MAX
3883# ifdef ULONGLONG_MAX
3884# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
3885# else
3886# ifdef MAXULONGLONG
3887# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
3888# else
3889# define PERL_UQUAD_MAX (~(unsigned long long)0)
3890# endif
3891# endif
3892# endif
3893
3894# ifndef PERL_UQUAD_MIN
3895# define PERL_UQUAD_MIN ((unsigned long long)0L)
3896# endif
3897
3898# ifndef PERL_QUAD_MAX
3899# ifdef LONGLONG_MAX
3900# define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
3901# else
3902# ifdef MAXLONGLONG
3903# define PERL_QUAD_MAX ((long long)MAXLONGLONG)
3904# else
3905# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
3906# endif
3907# endif
3908# endif
3909
3910# ifndef PERL_QUAD_MIN
3911# ifdef LONGLONG_MIN
3912# define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
3913# else
3914# ifdef MINLONGLONG
3915# define PERL_QUAD_MIN ((long long)MINLONGLONG)
3916# else
3917# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
3918# endif
3919# endif
3920# endif
3921#endif
3922
3923/* This is based on code from 5.003 perl.h */
3924#ifdef HAS_QUAD
3925# ifdef cray
3926#ifndef IVTYPE
3927# define IVTYPE int
3928#endif
3929
3930#ifndef IV_MIN
3931# define IV_MIN PERL_INT_MIN
3932#endif
3933
3934#ifndef IV_MAX
3935# define IV_MAX PERL_INT_MAX
3936#endif
3937
3938#ifndef UV_MIN
3939# define UV_MIN PERL_UINT_MIN
3940#endif
3941
3942#ifndef UV_MAX
3943# define UV_MAX PERL_UINT_MAX
3944#endif
3945
3946# ifdef INTSIZE
3947#ifndef IVSIZE
3948# define IVSIZE INTSIZE
3949#endif
3950
3951# endif
3952# else
3953# if defined(convex) || defined(uts)
3954#ifndef IVTYPE
3955# define IVTYPE long long
3956#endif
3957
3958#ifndef IV_MIN
3959# define IV_MIN PERL_QUAD_MIN
3960#endif
3961
3962#ifndef IV_MAX
3963# define IV_MAX PERL_QUAD_MAX
3964#endif
3965
3966#ifndef UV_MIN
3967# define UV_MIN PERL_UQUAD_MIN
3968#endif
3969
3970#ifndef UV_MAX
3971# define UV_MAX PERL_UQUAD_MAX
3972#endif
3973
3974# ifdef LONGLONGSIZE
3975#ifndef IVSIZE
3976# define IVSIZE LONGLONGSIZE
3977#endif
3978
3979# endif
3980# else
3981#ifndef IVTYPE
3982# define IVTYPE long
3983#endif
3984
3985#ifndef IV_MIN
3986# define IV_MIN PERL_LONG_MIN
3987#endif
3988
3989#ifndef IV_MAX
3990# define IV_MAX PERL_LONG_MAX
3991#endif
3992
3993#ifndef UV_MIN
3994# define UV_MIN PERL_ULONG_MIN
3995#endif
3996
3997#ifndef UV_MAX
3998# define UV_MAX PERL_ULONG_MAX
3999#endif
4000
4001# ifdef LONGSIZE
4002#ifndef IVSIZE
4003# define IVSIZE LONGSIZE
4004#endif
4005
4006# endif
4007# endif
4008# endif
4009#ifndef IVSIZE
4010# define IVSIZE 8
4011#endif
4012
4013#ifndef LONGSIZE
4014# define LONGSIZE 8
4015#endif
4016
4017#ifndef PERL_QUAD_MIN
4018# define PERL_QUAD_MIN IV_MIN
4019#endif
4020
4021#ifndef PERL_QUAD_MAX
4022# define PERL_QUAD_MAX IV_MAX
4023#endif
4024
4025#ifndef PERL_UQUAD_MIN
4026# define PERL_UQUAD_MIN UV_MIN
4027#endif
4028
4029#ifndef PERL_UQUAD_MAX
4030# define PERL_UQUAD_MAX UV_MAX
4031#endif
4032
4033#else
4034#ifndef IVTYPE
4035# define IVTYPE long
4036#endif
4037
4038#ifndef LONGSIZE
4039# define LONGSIZE 4
4040#endif
4041
4042#ifndef IV_MIN
4043# define IV_MIN PERL_LONG_MIN
4044#endif
4045
4046#ifndef IV_MAX
4047# define IV_MAX PERL_LONG_MAX
4048#endif
4049
4050#ifndef UV_MIN
4051# define UV_MIN PERL_ULONG_MIN
4052#endif
4053
4054#ifndef UV_MAX
4055# define UV_MAX PERL_ULONG_MAX
4056#endif
4057
4058#endif
4059
4060#ifndef IVSIZE
4061# ifdef LONGSIZE
4062# define IVSIZE LONGSIZE
4063# else
4064# define IVSIZE 4 /* A bold guess, but the best we can make. */
4065# endif
4066#endif
4067#ifndef UVTYPE
4068# define UVTYPE unsigned IVTYPE
4069#endif
4070
4071#ifndef UVSIZE
4072# define UVSIZE IVSIZE
4073#endif
4074#ifndef sv_setuv
4075# define sv_setuv(sv, uv) \
4076 STMT_START { \
4077 UV TeMpUv = uv; \
4078 if (TeMpUv <= IV_MAX) \
4079 sv_setiv(sv, TeMpUv); \
4080 else \
4081 sv_setnv(sv, (double)TeMpUv); \
4082 } STMT_END
4083#endif
4084#ifndef newSVuv
4085# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
4086#endif
4087#ifndef sv_2uv
4088# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
4089#endif
4090
4091#ifndef SvUVX
4092# define SvUVX(sv) ((UV)SvIVX(sv))
4093#endif
4094
4095#ifndef SvUVXx
4096# define SvUVXx(sv) SvUVX(sv)
4097#endif
4098
4099#ifndef SvUV
4100# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
4101#endif
4102
4103#ifndef SvUVx
4104# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
4105#endif
4106
4107/* Hint: sv_uv
4108 * Always use the SvUVx() macro instead of sv_uv().
4109 */
4110#ifndef sv_uv
4111# define sv_uv(sv) SvUVx(sv)
4112#endif
4113
4114#if !defined(SvUOK) && defined(SvIOK_UV)
4115# define SvUOK(sv) SvIOK_UV(sv)
4116#endif
4117#ifndef XST_mUV
4118# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
4119#endif
4120
4121#ifndef XSRETURN_UV
4122# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
4123#endif
4124#ifndef PUSHu
4125# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
4126#endif
4127
4128#ifndef XPUSHu
4129# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
4130#endif
4131
4132#ifdef HAS_MEMCMP
4133#ifndef memNE
4134# define memNE(s1,s2,l) (memcmp(s1,s2,l))
4135#endif
4136
4137#ifndef memEQ
4138# define memEQ(s1,s2,l) (!memcmp(s1,s2,l))
4139#endif
4140
4141#else
4142#ifndef memNE
4143# define memNE(s1,s2,l) (bcmp(s1,s2,l))
4144#endif
4145
4146#ifndef memEQ
4147# define memEQ(s1,s2,l) (!bcmp(s1,s2,l))
4148#endif
4149
4150#endif
4151#ifndef memEQs
4152# define memEQs(s1, l, s2) \
4153 (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
4154#endif
4155
4156#ifndef memNEs
4157# define memNEs(s1, l, s2) !memEQs(s1, l, s2)
4158#endif
4159#ifndef MoveD
4160# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
4161#endif
4162
4163#ifndef CopyD
4164# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
4165#endif
4166
4167#ifdef HAS_MEMSET
4168#ifndef ZeroD
4169# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
4170#endif
4171
4172#else
4173#ifndef ZeroD
4174# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
4175#endif
4176
4177#endif
4178#ifndef PoisonWith
4179# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
4180#endif
4181
4182#ifndef PoisonNew
4183# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
4184#endif
4185
4186#ifndef PoisonFree
4187# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
4188#endif
4189
4190#ifndef Poison
4191# define Poison(d,n,t) PoisonFree(d,n,t)
4192#endif
4193#ifndef Newx
4194# define Newx(v,n,t) New(0,v,n,t)
4195#endif
4196
4197#ifndef Newxc
4198# define Newxc(v,n,t,c) Newc(0,v,n,t,c)
4199#endif
4200
4201#ifndef Newxz
4202# define Newxz(v,n,t) Newz(0,v,n,t)
4203#endif
4204#ifndef PERL_MAGIC_qr
4205# define PERL_MAGIC_qr 'r'
4206#endif
4207#ifndef cBOOL
4208# define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
4209#endif
4210
4211#ifndef OpHAS_SIBLING
4212# define OpHAS_SIBLING(o) (cBOOL((o)->op_sibling))
4213#endif
4214
4215#ifndef OpSIBLING
4216# define OpSIBLING(o) (0 + (o)->op_sibling)
4217#endif
4218
4219#ifndef OpMORESIB_set
4220# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
4221#endif
4222
4223#ifndef OpLASTSIB_set
4224# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
4225#endif
4226
4227#ifndef OpMAYBESIB_set
4228# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
4229#endif
4230
4231#ifndef SvRX
4232#if defined(NEED_SvRX)
4233static void * DPPP_(my_SvRX)(pTHX_ SV *rv);
4234static
4235#else
4236extern void * DPPP_(my_SvRX)(pTHX_ SV *rv);
4237#endif
4238
4239#ifdef SvRX
4240# undef SvRX
4241#endif
4242#define SvRX(a) DPPP_(my_SvRX)(aTHX_ a)
4243
4244#if defined(NEED_SvRX) || defined(NEED_SvRX_GLOBAL)
4245
4246void *
4247DPPP_(my_SvRX)(pTHX_ SV *rv)
4248{
4249 if (SvROK(rv)) {
4250 SV *sv = SvRV(rv);
4251 if (SvMAGICAL(sv)) {
4252 MAGIC *mg = mg_find(sv, PERL_MAGIC_qr);
4253 if (mg && mg->mg_obj) {
4254 return mg->mg_obj;
4255 }
4256 }
4257 }
4258 return 0;
4259}
4260#endif
4261#endif
4262#ifndef SvRXOK
4263# define SvRXOK(sv) (!!SvRX(sv))
4264#endif
4265
4266#ifndef PERL_UNUSED_DECL
4267# ifdef HASATTRIBUTE
4268# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
4269# define PERL_UNUSED_DECL
4270# else
4271# define PERL_UNUSED_DECL __attribute__((unused))
4272# endif
4273# else
4274# define PERL_UNUSED_DECL
4275# endif
4276#endif
4277
4278#ifndef PERL_UNUSED_ARG
4279# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
4280# include <note.h>
4281# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
4282# else
4283# define PERL_UNUSED_ARG(x) ((void)x)
4284# endif
4285#endif
4286
4287#ifndef PERL_UNUSED_VAR
4288# define PERL_UNUSED_VAR(x) ((void)x)
4289#endif
4290
4291#ifndef PERL_UNUSED_CONTEXT
4292# ifdef USE_ITHREADS
4293# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
4294# else
4295# define PERL_UNUSED_CONTEXT
4296# endif
4297#endif
4298
4299#ifndef PERL_UNUSED_RESULT
4300# if defined(__GNUC__) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT)
4301# define PERL_UNUSED_RESULT(v) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END
4302# else
4303# define PERL_UNUSED_RESULT(v) ((void)(v))
4304# endif
4305#endif
4306#ifndef NOOP
4307# define NOOP /*EMPTY*/(void)0
4308#endif
4309
4310#ifndef dNOOP
4311# define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
4312#endif
4313
4314#ifndef NVTYPE
4315# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
4316# define NVTYPE long double
4317# else
4318# define NVTYPE double
4319# endif
4320typedef NVTYPE NV;
4321#endif
4322
4323#ifndef INT2PTR
4324# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
4325# define PTRV UV
4326# define INT2PTR(any,d) (any)(d)
4327# else
4328# if PTRSIZE == LONGSIZE
4329# define PTRV unsigned long
4330# else
4331# define PTRV unsigned
4332# endif
4333# define INT2PTR(any,d) (any)(PTRV)(d)
4334# endif
4335#endif
4336
4337#ifndef PTR2ul
4338# if PTRSIZE == LONGSIZE
4339# define PTR2ul(p) (unsigned long)(p)
4340# else
4341# define PTR2ul(p) INT2PTR(unsigned long,p)
4342# endif
4343#endif
4344#ifndef PTR2nat
4345# define PTR2nat(p) (PTRV)(p)
4346#endif
4347
4348#ifndef NUM2PTR
4349# define NUM2PTR(any,d) (any)PTR2nat(d)
4350#endif
4351
4352#ifndef PTR2IV
4353# define PTR2IV(p) INT2PTR(IV,p)
4354#endif
4355
4356#ifndef PTR2UV
4357# define PTR2UV(p) INT2PTR(UV,p)
4358#endif
4359
4360#ifndef PTR2NV
4361# define PTR2NV(p) NUM2PTR(NV,p)
4362#endif
4363
4364#undef START_EXTERN_C
4365#undef END_EXTERN_C
4366#undef EXTERN_C
4367#ifdef __cplusplus
4368# define START_EXTERN_C extern "C" {
4369# define END_EXTERN_C }
4370# define EXTERN_C extern "C"
4371#else
4372# define START_EXTERN_C
4373# define END_EXTERN_C
4374# define EXTERN_C extern
4375#endif
4376
4377#if defined(PERL_GCC_PEDANTIC)
4378# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
4379# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
4380# endif
4381#endif
4382
4383#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
4384# ifndef PERL_USE_GCC_BRACE_GROUPS
4385# define PERL_USE_GCC_BRACE_GROUPS
4386# endif
4387#endif
4388
4389#undef STMT_START
4390#undef STMT_END
4391#ifdef PERL_USE_GCC_BRACE_GROUPS
4392# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
4393# define STMT_END )
4394#else
4395# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
4396# define STMT_START if (1)
4397# define STMT_END else (void)0
4398# else
4399# define STMT_START do
4400# define STMT_END while (0)
4401# endif
4402#endif
4403#ifndef boolSV
4404# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
4405#endif
4406
4407/* DEFSV appears first in 5.004_56 */
4408#ifndef DEFSV
4409# define DEFSV GvSV(PL_defgv)
4410#endif
4411
4412#ifndef SAVE_DEFSV
4413# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
4414#endif
4415
4416#ifndef DEFSV_set
4417# define DEFSV_set(sv) (DEFSV = (sv))
4418#endif
4419
4420/* Older perls (<=5.003) lack AvFILLp */
4421#ifndef AvFILLp
4422# define AvFILLp AvFILL
4423#endif
4424#ifndef ERRSV
4425# define ERRSV get_sv("@",FALSE)
4426#endif
4427
4428/* Hint: gv_stashpvn
4429 * This function's backport doesn't support the length parameter, but
4430 * rather ignores it. Portability can only be ensured if the length
4431 * parameter is used for speed reasons, but the length can always be
4432 * correctly computed from the string argument.
4433 */
4434#ifndef gv_stashpvn
4435# define gv_stashpvn(str,len,create) gv_stashpv(str,create)
4436#endif
4437
4438/* Replace: 1 */
4439#ifndef get_cv
4440# define get_cv perl_get_cv
4441#endif
4442
4443#ifndef get_sv
4444# define get_sv perl_get_sv
4445#endif
4446
4447#ifndef get_av
4448# define get_av perl_get_av
4449#endif
4450
4451#ifndef get_hv
4452# define get_hv perl_get_hv
4453#endif
4454
4455/* Replace: 0 */
4456#ifndef dUNDERBAR
4457# define dUNDERBAR dNOOP
4458#endif
4459
4460#ifndef UNDERBAR
4461# define UNDERBAR DEFSV
4462#endif
4463#ifndef dAX
4464# define dAX I32 ax = MARK - PL_stack_base + 1
4465#endif
4466
4467#ifndef dITEMS
4468# define dITEMS I32 items = SP - MARK
4469#endif
4470#ifndef dXSTARG
4471# define dXSTARG SV * targ = sv_newmortal()
4472#endif
4473#ifndef dAXMARK
4474# define dAXMARK I32 ax = POPMARK; \
4475 register SV ** const mark = PL_stack_base + ax++
4476#endif
4477#ifndef XSprePUSH
4478# define XSprePUSH (sp = PL_stack_base + ax - 1)
4479#endif
4480
4481#if (PERL_BCDVERSION < 0x5005000)
4482# undef XSRETURN
4483# define XSRETURN(off) \
4484 STMT_START { \
4485 PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
4486 return; \
4487 } STMT_END
4488#endif
4489#ifndef XSPROTO
4490# define XSPROTO(name) void name(pTHX_ CV* cv)
4491#endif
4492
4493#ifndef SVfARG
4494# define SVfARG(p) ((void*)(p))
4495#endif
4496#ifndef PERL_ABS
4497# define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
4498#endif
4499#ifndef dVAR
4500# define dVAR dNOOP
4501#endif
4502#ifndef SVf
4503# define SVf "_"
4504#endif
4505#ifndef UTF8_MAXBYTES
4506# define UTF8_MAXBYTES UTF8_MAXLEN
4507#endif
4508#ifndef CPERLscope
4509# define CPERLscope(x) x
4510#endif
4511#ifndef PERL_HASH
4512# define PERL_HASH(hash,str,len) \
4513 STMT_START { \
4514 const char *s_PeRlHaSh = str; \
4515 I32 i_PeRlHaSh = len; \
4516 U32 hash_PeRlHaSh = 0; \
4517 while (i_PeRlHaSh--) \
4518 hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
4519 (hash) = hash_PeRlHaSh; \
4520 } STMT_END
4521#endif
4522
4523#ifndef PERLIO_FUNCS_DECL
4524# ifdef PERLIO_FUNCS_CONST
4525# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
4526# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
4527# else
4528# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
4529# define PERLIO_FUNCS_CAST(funcs) (funcs)
4530# endif
4531#endif
4532
4533/* provide these typedefs for older perls */
4534#if (PERL_BCDVERSION < 0x5009003)
4535
4536# ifdef ARGSproto
4537typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
4538# else
4539typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
4540# endif
4541
4542typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
4543
4544#endif
4545#ifndef isPSXSPC
4546# define isPSXSPC(c) (isSPACE(c) || (c) == '\v')
4547#endif
4548
4549#ifndef isBLANK
4550# define isBLANK(c) ((c) == ' ' || (c) == '\t')
4551#endif
4552
4553#ifdef EBCDIC
4554#ifndef isALNUMC
4555# define isALNUMC(c) isalnum(c)
4556#endif
4557
4558#ifndef isASCII
4559# define isASCII(c) isascii(c)
4560#endif
4561
4562#ifndef isCNTRL
4563# define isCNTRL(c) iscntrl(c)
4564#endif
4565
4566#ifndef isGRAPH
4567# define isGRAPH(c) isgraph(c)
4568#endif
4569
4570#ifndef isPRINT
4571# define isPRINT(c) isprint(c)
4572#endif
4573
4574#ifndef isPUNCT
4575# define isPUNCT(c) ispunct(c)
4576#endif
4577
4578#ifndef isXDIGIT
4579# define isXDIGIT(c) isxdigit(c)
4580#endif
4581
4582#else
4583# if (PERL_BCDVERSION < 0x5010000)
4584/* Hint: isPRINT
4585 * The implementation in older perl versions includes all of the
4586 * isSPACE() characters, which is wrong. The version provided by
4587 * Devel::PPPort always overrides a present buggy version.
4588 */
4589# undef isPRINT
4590# endif
4591
4592#ifdef HAS_QUAD
4593# ifdef U64TYPE
4594# define WIDEST_UTYPE U64TYPE
4595# else
4596# define WIDEST_UTYPE Quad_t
4597# endif
4598#else
4599# define WIDEST_UTYPE U32
4600#endif
4601#ifndef isALNUMC
4602# define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
4603#endif
4604
4605#ifndef isASCII
4606# define isASCII(c) ((WIDEST_UTYPE) (c) <= 127)
4607#endif
4608
4609#ifndef isCNTRL
4610# define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
4611#endif
4612
4613#ifndef isGRAPH
4614# define isGRAPH(c) (isALNUM(c) || isPUNCT(c))
4615#endif
4616
4617#ifndef isPRINT
4618# define isPRINT(c) (((c) >= 32 && (c) < 127))
4619#endif
4620
4621#ifndef isPUNCT
4622# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
4623#endif
4624
4625#ifndef isXDIGIT
4626# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
4627#endif
4628
4629#endif
4630
4631/* Until we figure out how to support this in older perls... */
4632#if (PERL_BCDVERSION >= 0x5008000)
4633#ifndef HeUTF8
4634# define HeUTF8(he) ((HeKLEN(he) == HEf_SVKEY) ? \
4635 SvUTF8(HeKEY_sv(he)) : \
4636 (U32)HeKUTF8(he))
4637#endif
4638
4639#endif
4640#ifndef C_ARRAY_LENGTH
4641# define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0]))
4642#endif
4643
4644#ifndef C_ARRAY_END
4645# define C_ARRAY_END(a) ((a) + C_ARRAY_LENGTH(a))
4646#endif
4647
4648#ifndef PERL_SIGNALS_UNSAFE_FLAG
4649
4650#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
4651
4652#if (PERL_BCDVERSION < 0x5008000)
4653# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG
4654#else
4655# define D_PPP_PERL_SIGNALS_INIT 0
4656#endif
4657
4658#if defined(NEED_PL_signals)
4659static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4660#elif defined(NEED_PL_signals_GLOBAL)
4661U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
4662#else
4663extern U32 DPPP_(my_PL_signals);
4664#endif
4665#define PL_signals DPPP_(my_PL_signals)
4666
4667#endif
4668
4669/* Hint: PL_ppaddr
4670 * Calling an op via PL_ppaddr requires passing a context argument
4671 * for threaded builds. Since the context argument is different for
4672 * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
4673 * automatically be defined as the correct argument.
4674 */
4675
4676#if (PERL_BCDVERSION <= 0x5005005)
4677/* Replace: 1 */
4678# define PL_ppaddr ppaddr
4679# define PL_no_modify no_modify
4680/* Replace: 0 */
4681#endif
4682
4683#if (PERL_BCDVERSION <= 0x5004005)
4684/* Replace: 1 */
4685# define PL_DBsignal DBsignal
4686# define PL_DBsingle DBsingle
4687# define PL_DBsub DBsub
4688# define PL_DBtrace DBtrace
4689# define PL_Sv Sv
4690# define PL_bufend bufend
4691# define PL_bufptr bufptr
4692# define PL_compiling compiling
4693# define PL_copline copline
4694# define PL_curcop curcop
4695# define PL_curstash curstash
4696# define PL_debstash debstash
4697# define PL_defgv defgv
4698# define PL_diehook diehook
4699# define PL_dirty dirty
4700# define PL_dowarn dowarn
4701# define PL_errgv errgv
4702# define PL_error_count error_count
4703# define PL_expect expect
4704# define PL_hexdigit hexdigit
4705# define PL_hints hints
4706# define PL_in_my in_my
4707# define PL_laststatval laststatval
4708# define PL_lex_state lex_state
4709# define PL_lex_stuff lex_stuff
4710# define PL_linestr linestr
4711# define PL_na na
4712# define PL_perl_destruct_level perl_destruct_level
4713# define PL_perldb perldb
4714# define PL_rsfp_filters rsfp_filters
4715# define PL_rsfp rsfp
4716# define PL_stack_base stack_base
4717# define PL_stack_sp stack_sp
4718# define PL_statcache statcache
4719# define PL_stdingv stdingv
4720# define PL_sv_arenaroot sv_arenaroot
4721# define PL_sv_no sv_no
4722# define PL_sv_undef sv_undef
4723# define PL_sv_yes sv_yes
4724# define PL_tainted tainted
4725# define PL_tainting tainting
4726# define PL_tokenbuf tokenbuf
4727/* Replace: 0 */
4728#endif
4729
4730/* Warning: PL_parser
4731 * For perl versions earlier than 5.9.5, this is an always
4732 * non-NULL dummy. Also, it cannot be dereferenced. Don't
4733 * use it if you can avoid is and unless you absolutely know
4734 * what you're doing.
4735 * If you always check that PL_parser is non-NULL, you can
4736 * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
4737 * a dummy parser structure.
4738 */
4739
4740#if (PERL_BCDVERSION >= 0x5009005)
4741# ifdef DPPP_PL_parser_NO_DUMMY
4742# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4743 (croak("panic: PL_parser == NULL in %s:%d", \
4744 __FILE__, __LINE__), (yy_parser *) NULL))->var)
4745# else
4746# ifdef DPPP_PL_parser_NO_DUMMY_WARNING
4747# define D_PPP_parser_dummy_warning(var)
4748# else
4749# define D_PPP_parser_dummy_warning(var) \
4750 warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
4751# endif
4752# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
4753 (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
4754#if defined(NEED_PL_parser)
4755static yy_parser DPPP_(dummy_PL_parser);
4756#elif defined(NEED_PL_parser_GLOBAL)
4757yy_parser DPPP_(dummy_PL_parser);
4758#else
4759extern yy_parser DPPP_(dummy_PL_parser);
4760#endif
4761
4762# endif
4763
4764/* 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 */
4765/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
4766 * Do not use this variable unless you know exactly what you're
4767 * doing. It is internal to the perl parser and may change or even
4768 * be removed in the future. As of perl 5.9.5, you have to check
4769 * for (PL_parser != NULL) for this variable to have any effect.
4770 * An always non-NULL PL_parser dummy is provided for earlier
4771 * perl versions.
4772 * If PL_parser is NULL when you try to access this variable, a
4773 * dummy is being accessed instead and a warning is issued unless
4774 * you define DPPP_PL_parser_NO_DUMMY_WARNING.
4775 * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
4776 * this variable will croak with a panic message.
4777 */
4778
4779# define PL_expect D_PPP_my_PL_parser_var(expect)
4780# define PL_copline D_PPP_my_PL_parser_var(copline)
4781# define PL_rsfp D_PPP_my_PL_parser_var(rsfp)
4782# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters)
4783# define PL_linestr D_PPP_my_PL_parser_var(linestr)
4784# define PL_bufptr D_PPP_my_PL_parser_var(bufptr)
4785# define PL_bufend D_PPP_my_PL_parser_var(bufend)
4786# define PL_lex_state D_PPP_my_PL_parser_var(lex_state)
4787# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff)
4788# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf)
4789# define PL_in_my D_PPP_my_PL_parser_var(in_my)
4790# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash)
4791# define PL_error_count D_PPP_my_PL_parser_var(error_count)
4792
4793
4794#else
4795
4796/* ensure that PL_parser != NULL and cannot be dereferenced */
4797# define PL_parser ((void *) 1)
4798
4799#endif
4800#ifndef mPUSHs
4801# define mPUSHs(s) PUSHs(sv_2mortal(s))
4802#endif
4803
4804#ifndef PUSHmortal
4805# define PUSHmortal PUSHs(sv_newmortal())
4806#endif
4807
4808#ifndef mPUSHp
4809# define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
4810#endif
4811
4812#ifndef mPUSHn
4813# define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
4814#endif
4815
4816#ifndef mPUSHi
4817# define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
4818#endif
4819
4820#ifndef mPUSHu
4821# define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
4822#endif
4823#ifndef mXPUSHs
4824# define mXPUSHs(s) XPUSHs(sv_2mortal(s))
4825#endif
4826
4827#ifndef XPUSHmortal
4828# define XPUSHmortal XPUSHs(sv_newmortal())
4829#endif
4830
4831#ifndef mXPUSHp
4832# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
4833#endif
4834
4835#ifndef mXPUSHn
4836# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
4837#endif
4838
4839#ifndef mXPUSHi
4840# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
4841#endif
4842
4843#ifndef mXPUSHu
4844# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
4845#endif
4846
4847/* Replace: 1 */
4848#ifndef call_sv
4849# define call_sv perl_call_sv
4850#endif
4851
4852#ifndef call_pv
4853# define call_pv perl_call_pv
4854#endif
4855
4856#ifndef call_argv
4857# define call_argv perl_call_argv
4858#endif
4859
4860#ifndef call_method
4861# define call_method perl_call_method
4862#endif
4863#ifndef eval_sv
4864# define eval_sv perl_eval_sv
4865#endif
4866
4867/* Replace: 0 */
4868#ifndef PERL_LOADMOD_DENY
4869# define PERL_LOADMOD_DENY 0x1
4870#endif
4871
4872#ifndef PERL_LOADMOD_NOIMPORT
4873# define PERL_LOADMOD_NOIMPORT 0x2
4874#endif
4875
4876#ifndef PERL_LOADMOD_IMPORT_OPS
4877# define PERL_LOADMOD_IMPORT_OPS 0x4
4878#endif
4879
4880#ifndef G_METHOD
4881# define G_METHOD 64
4882# ifdef call_sv
4883# undef call_sv
4884# endif
4885# if (PERL_BCDVERSION < 0x5006000)
4886# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
4887 (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
4888# else
4889# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
4890 (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
4891# endif
4892#endif
4893
4894/* Replace perl_eval_pv with eval_pv */
4895
4896#ifndef eval_pv
4897#if defined(NEED_eval_pv)
4898static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4899static
4900#else
4901extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
4902#endif
4903
4904#ifdef eval_pv
4905# undef eval_pv
4906#endif
4907#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
4908#define Perl_eval_pv DPPP_(my_eval_pv)
4909
4910#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
4911
4912SV*
4913DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
4914{
4915 dSP;
4916 SV* sv = newSVpv(p, 0);
4917
4918 PUSHMARK(sp);
4919 eval_sv(sv, G_SCALAR);
4920 SvREFCNT_dec(sv);
4921
4922 SPAGAIN;
4923 sv = POPs;
4924 PUTBACK;
4925
4926 if (croak_on_error && SvTRUE(GvSV(errgv)))
4927 croak(SvPVx(GvSV(errgv), na));
4928
4929 return sv;
4930}
4931
4932#endif
4933#endif
4934
4935#ifndef vload_module
4936#if defined(NEED_vload_module)
4937static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4938static
4939#else
4940extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
4941#endif
4942
4943#ifdef vload_module
4944# undef vload_module
4945#endif
4946#define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
4947#define Perl_vload_module DPPP_(my_vload_module)
4948
4949#if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
4950
4951void
4952DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
4953{
4954 dTHR;
4955 dVAR;
4956 OP *veop, *imop;
4957
4958 OP * const modname = newSVOP(OP_CONST, 0, name);
4959 /* 5.005 has a somewhat hacky force_normal that doesn't croak on
4960 SvREADONLY() if PL_compling is true. Current perls take care in
4961 ck_require() to correctly turn off SvREADONLY before calling
4962 force_normal_flags(). This seems a better fix than fudging PL_compling
4963 */
4964 SvREADONLY_off(((SVOP*)modname)->op_sv);
4965 modname->op_private |= OPpCONST_BARE;
4966 if (ver) {
4967 veop = newSVOP(OP_CONST, 0, ver);
4968 }
4969 else
4970 veop = NULL;
4971 if (flags & PERL_LOADMOD_NOIMPORT) {
4972 imop = sawparens(newNULLLIST());
4973 }
4974 else if (flags & PERL_LOADMOD_IMPORT_OPS) {
4975 imop = va_arg(*args, OP*);
4976 }
4977 else {
4978 SV *sv;
4979 imop = NULL;
4980 sv = va_arg(*args, SV*);
4981 while (sv) {
4982 imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
4983 sv = va_arg(*args, SV*);
4984 }
4985 }
4986 {
4987 const line_t ocopline = PL_copline;
4988 COP * const ocurcop = PL_curcop;
4989 const int oexpect = PL_expect;
4990
4991#if (PERL_BCDVERSION >= 0x5004000)
4992 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
4993 veop, modname, imop);
4994#elif (PERL_BCDVERSION > 0x5003000)
4995 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
4996 veop, modname, imop);
4997#else
4998 utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
4999 modname, imop);
5000#endif
5001 PL_expect = oexpect;
5002 PL_copline = ocopline;
5003 PL_curcop = ocurcop;
5004 }
5005}
5006
5007#endif
5008#endif
5009
5010#ifndef load_module
5011#if defined(NEED_load_module)
5012static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
5013static
5014#else
5015extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
5016#endif
5017
5018#ifdef load_module
5019# undef load_module
5020#endif
5021#define load_module DPPP_(my_load_module)
5022#define Perl_load_module DPPP_(my_load_module)
5023
5024#if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
5025
5026void
5027DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
5028{
5029 va_list args;
5030 va_start(args, ver);
5031 vload_module(flags, name, ver, &args);
5032 va_end(args);
5033}
5034
5035#endif
5036#endif
5037#ifndef newRV_inc
5038# define newRV_inc(sv) newRV(sv) /* Replace */
5039#endif
5040
5041#ifndef newRV_noinc
5042#if defined(NEED_newRV_noinc)
5043static SV * DPPP_(my_newRV_noinc)(SV *sv);
5044static
5045#else
5046extern SV * DPPP_(my_newRV_noinc)(SV *sv);
5047#endif
5048
5049#ifdef newRV_noinc
5050# undef newRV_noinc
5051#endif
5052#define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
5053#define Perl_newRV_noinc DPPP_(my_newRV_noinc)
5054
5055#if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
5056SV *
5057DPPP_(my_newRV_noinc)(SV *sv)
5058{
5059 SV *rv = (SV *)newRV(sv);
5060 SvREFCNT_dec(sv);
5061 return rv;
5062}
5063#endif
5064#endif
5065
5066/* Hint: newCONSTSUB
5067 * Returns a CV* as of perl-5.7.1. This return value is not supported
5068 * by Devel::PPPort.
5069 */
5070
5071/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
5072#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
5073#if defined(NEED_newCONSTSUB)
5074static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
5075static
5076#else
5077extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
5078#endif
5079
5080#ifdef newCONSTSUB
5081# undef newCONSTSUB
5082#endif
5083#define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
5084#define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
5085
5086#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
5087
5088/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
5089/* (There's no PL_parser in perl < 5.005, so this is completely safe) */
5090#define D_PPP_PL_copline PL_copline
5091
5092void
5093DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
5094{
5095 U32 oldhints = PL_hints;
5096 HV *old_cop_stash = PL_curcop->cop_stash;
5097 HV *old_curstash = PL_curstash;
5098 line_t oldline = PL_curcop->cop_line;
5099 PL_curcop->cop_line = D_PPP_PL_copline;
5100
5101 PL_hints &= ~HINT_BLOCK_SCOPE;
5102 if (stash)
5103 PL_curstash = PL_curcop->cop_stash = stash;
5104
5105 newSUB(
5106
5107#if (PERL_BCDVERSION < 0x5003022)
5108 start_subparse(),
5109#elif (PERL_BCDVERSION == 0x5003022)
5110 start_subparse(0),
5111#else /* 5.003_23 onwards */
5112 start_subparse(FALSE, 0),
5113#endif
5114
5115 newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
5116 newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
5117 newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
5118 );
5119
5120 PL_hints = oldhints;
5121 PL_curcop->cop_stash = old_cop_stash;
5122 PL_curstash = old_curstash;
5123 PL_curcop->cop_line = oldline;
5124}
5125#endif
5126#endif
5127
5128/*
5129 * Boilerplate macros for initializing and accessing interpreter-local
5130 * data from C. All statics in extensions should be reworked to use
5131 * this, if you want to make the extension thread-safe. See ext/re/re.xs
5132 * for an example of the use of these macros.
5133 *
5134 * Code that uses these macros is responsible for the following:
5135 * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
5136 * 2. Declare a typedef named my_cxt_t that is a structure that contains
5137 * all the data that needs to be interpreter-local.
5138 * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
5139 * 4. Use the MY_CXT_INIT macro such that it is called exactly once
5140 * (typically put in the BOOT: section).
5141 * 5. Use the members of the my_cxt_t structure everywhere as
5142 * MY_CXT.member.
5143 * 6. Use the dMY_CXT macro (a declaration) in all the functions that
5144 * access MY_CXT.
5145 */
5146
5147#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
5148 defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
5149
5150#ifndef START_MY_CXT
5151
5152/* This must appear in all extensions that define a my_cxt_t structure,
5153 * right after the definition (i.e. at file scope). The non-threads
5154 * case below uses it to declare the data as static. */
5155#define START_MY_CXT
5156
5157#if (PERL_BCDVERSION < 0x5004068)
5158/* Fetches the SV that keeps the per-interpreter data. */
5159#define dMY_CXT_SV \
5160 SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
5161#else /* >= perl5.004_68 */
5162#define dMY_CXT_SV \
5163 SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
5164 sizeof(MY_CXT_KEY)-1, TRUE)
5165#endif /* < perl5.004_68 */
5166
5167/* This declaration should be used within all functions that use the
5168 * interpreter-local data. */
5169#define dMY_CXT \
5170 dMY_CXT_SV; \
5171 my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
5172
5173/* Creates and zeroes the per-interpreter data.
5174 * (We allocate my_cxtp in a Perl SV so that it will be released when
5175 * the interpreter goes away.) */
5176#define MY_CXT_INIT \
5177 dMY_CXT_SV; \
5178 /* newSV() allocates one more than needed */ \
5179 my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5180 Zero(my_cxtp, 1, my_cxt_t); \
5181 sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5182
5183/* This macro must be used to access members of the my_cxt_t structure.
5184 * e.g. MYCXT.some_data */
5185#define MY_CXT (*my_cxtp)
5186
5187/* Judicious use of these macros can reduce the number of times dMY_CXT
5188 * is used. Use is similar to pTHX, aTHX etc. */
5189#define pMY_CXT my_cxt_t *my_cxtp
5190#define pMY_CXT_ pMY_CXT,
5191#define _pMY_CXT ,pMY_CXT
5192#define aMY_CXT my_cxtp
5193#define aMY_CXT_ aMY_CXT,
5194#define _aMY_CXT ,aMY_CXT
5195
5196#endif /* START_MY_CXT */
5197
5198#ifndef MY_CXT_CLONE
5199/* Clones the per-interpreter data. */
5200#define MY_CXT_CLONE \
5201 dMY_CXT_SV; \
5202 my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5203 Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
5204 sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5205#endif
5206
5207#else /* single interpreter */
5208
5209#ifndef START_MY_CXT
5210
5211#define START_MY_CXT static my_cxt_t my_cxt;
5212#define dMY_CXT_SV dNOOP
5213#define dMY_CXT dNOOP
5214#define MY_CXT_INIT NOOP
5215#define MY_CXT my_cxt
5216
5217#define pMY_CXT void
5218#define pMY_CXT_
5219#define _pMY_CXT
5220#define aMY_CXT
5221#define aMY_CXT_
5222#define _aMY_CXT
5223
5224#endif /* START_MY_CXT */
5225
5226#ifndef MY_CXT_CLONE
5227#define MY_CXT_CLONE NOOP
5228#endif
5229
5230#endif
5231
5232#ifndef IVdf
5233# if IVSIZE == LONGSIZE
5234# define IVdf "ld"
5235# define UVuf "lu"
5236# define UVof "lo"
5237# define UVxf "lx"
5238# define UVXf "lX"
5239# elif IVSIZE == INTSIZE
5240# define IVdf "d"
5241# define UVuf "u"
5242# define UVof "o"
5243# define UVxf "x"
5244# define UVXf "X"
5245# else
5246# error "cannot define IV/UV formats"
5247# endif
5248#endif
5249
5250#ifndef NVef
5251# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
5252 defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
5253 /* Not very likely, but let's try anyway. */
5254# define NVef PERL_PRIeldbl
5255# define NVff PERL_PRIfldbl
5256# define NVgf PERL_PRIgldbl
5257# else
5258# define NVef "e"
5259# define NVff "f"
5260# define NVgf "g"
5261# endif
5262#endif
5263
5264#ifndef SvREFCNT_inc
5265# ifdef PERL_USE_GCC_BRACE_GROUPS
5266# define SvREFCNT_inc(sv) \
5267 ({ \
5268 SV * const _sv = (SV*)(sv); \
5269 if (_sv) \
5270 (SvREFCNT(_sv))++; \
5271 _sv; \
5272 })
5273# else
5274# define SvREFCNT_inc(sv) \
5275 ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
5276# endif
5277#endif
5278
5279#ifndef SvREFCNT_inc_simple
5280# ifdef PERL_USE_GCC_BRACE_GROUPS
5281# define SvREFCNT_inc_simple(sv) \
5282 ({ \
5283 if (sv) \
5284 (SvREFCNT(sv))++; \
5285 (SV *)(sv); \
5286 })
5287# else
5288# define SvREFCNT_inc_simple(sv) \
5289 ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
5290# endif
5291#endif
5292
5293#ifndef SvREFCNT_inc_NN
5294# ifdef PERL_USE_GCC_BRACE_GROUPS
5295# define SvREFCNT_inc_NN(sv) \
5296 ({ \
5297 SV * const _sv = (SV*)(sv); \
5298 SvREFCNT(_sv)++; \
5299 _sv; \
5300 })
5301# else
5302# define SvREFCNT_inc_NN(sv) \
5303 (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
5304# endif
5305#endif
5306
5307#ifndef SvREFCNT_inc_void
5308# ifdef PERL_USE_GCC_BRACE_GROUPS
5309# define SvREFCNT_inc_void(sv) \
5310 ({ \
5311 SV * const _sv = (SV*)(sv); \
5312 if (_sv) \
5313 (void)(SvREFCNT(_sv)++); \
5314 })
5315# else
5316# define SvREFCNT_inc_void(sv) \
5317 (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
5318# endif
5319#endif
5320#ifndef SvREFCNT_inc_simple_void
5321# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
5322#endif
5323
5324#ifndef SvREFCNT_inc_simple_NN
5325# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
5326#endif
5327
5328#ifndef SvREFCNT_inc_void_NN
5329# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5330#endif
5331
5332#ifndef SvREFCNT_inc_simple_void_NN
5333# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5334#endif
5335
5336#ifndef newSV_type
5337
5338#if defined(NEED_newSV_type)
5339static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5340static
5341#else
5342extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5343#endif
5344
5345#ifdef newSV_type
5346# undef newSV_type
5347#endif
5348#define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a)
5349#define Perl_newSV_type DPPP_(my_newSV_type)
5350
5351#if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL)
5352
5353SV*
5354DPPP_(my_newSV_type)(pTHX_ svtype const t)
5355{
5356 SV* const sv = newSV(0);
5357 sv_upgrade(sv, t);
5358 return sv;
5359}
5360
5361#endif
5362
5363#endif
5364
5365#if (PERL_BCDVERSION < 0x5006000)
5366# define D_PPP_CONSTPV_ARG(x) ((char *) (x))
5367#else
5368# define D_PPP_CONSTPV_ARG(x) (x)
5369#endif
5370#ifndef newSVpvn
5371# define newSVpvn(data,len) ((data) \
5372 ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
5373 : newSV(0))
5374#endif
5375#ifndef newSVpvn_utf8
5376# define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
5377#endif
5378#ifndef SVf_UTF8
5379# define SVf_UTF8 0
5380#endif
5381
5382#ifndef newSVpvn_flags
5383
5384#if defined(NEED_newSVpvn_flags)
5385static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5386static
5387#else
5388extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5389#endif
5390
5391#ifdef newSVpvn_flags
5392# undef newSVpvn_flags
5393#endif
5394#define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c)
5395#define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags)
5396
5397#if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL)
5398
5399SV *
5400DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags)
5401{
5402 SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
5403 SvFLAGS(sv) |= (flags & SVf_UTF8);
5404 return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
5405}
5406
5407#endif
5408
5409#endif
5410
5411/* Backwards compatibility stuff... :-( */
5412#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
5413# define NEED_sv_2pv_flags
5414#endif
5415#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
5416# define NEED_sv_2pv_flags_GLOBAL
5417#endif
5418
5419/* Hint: sv_2pv_nolen
5420 * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
5421 */
5422#ifndef sv_2pv_nolen
5423# define sv_2pv_nolen(sv) SvPV_nolen(sv)
5424#endif
5425
5426#ifdef SvPVbyte
5427
5428/* Hint: SvPVbyte
5429 * Does not work in perl-5.6.1, ppport.h implements a version
5430 * borrowed from perl-5.7.3.
5431 */
5432
5433#if (PERL_BCDVERSION < 0x5007000)
5434
5435#if defined(NEED_sv_2pvbyte)
5436static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5437static
5438#else
5439extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
5440#endif
5441
5442#ifdef sv_2pvbyte
5443# undef sv_2pvbyte
5444#endif
5445#define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
5446#define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
5447
5448#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
5449
5450char *
5451DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp)
5452{
5453 sv_utf8_downgrade(sv,0);
5454 return SvPV(sv,*lp);
5455}
5456
5457#endif
5458
5459/* Hint: sv_2pvbyte
5460 * Use the SvPVbyte() macro instead of sv_2pvbyte().
5461 */
5462
5463#undef SvPVbyte
5464
5465#define SvPVbyte(sv, lp) \
5466 ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
5467 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
5468
5469#endif
5470
5471#else
5472
5473# define SvPVbyte SvPV
5474# define sv_2pvbyte sv_2pv
5475
5476#endif
5477#ifndef sv_2pvbyte_nolen
5478# define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv)
5479#endif
5480
5481/* Hint: sv_pvn
5482 * Always use the SvPV() macro instead of sv_pvn().
5483 */
5484
5485/* Hint: sv_pvn_force
5486 * Always use the SvPV_force() macro instead of sv_pvn_force().
5487 */
5488
5489/* If these are undefined, they're not handled by the core anyway */
5490#ifndef SV_IMMEDIATE_UNREF
5491# define SV_IMMEDIATE_UNREF 0
5492#endif
5493
5494#ifndef SV_GMAGIC
5495# define SV_GMAGIC 0
5496#endif
5497
5498#ifndef SV_COW_DROP_PV
5499# define SV_COW_DROP_PV 0
5500#endif
5501
5502#ifndef SV_UTF8_NO_ENCODING
5503# define SV_UTF8_NO_ENCODING 0
5504#endif
5505
5506#ifndef SV_NOSTEAL
5507# define SV_NOSTEAL 0
5508#endif
5509
5510#ifndef SV_CONST_RETURN
5511# define SV_CONST_RETURN 0
5512#endif
5513
5514#ifndef SV_MUTABLE_RETURN
5515# define SV_MUTABLE_RETURN 0
5516#endif
5517
5518#ifndef SV_SMAGIC
5519# define SV_SMAGIC 0
5520#endif
5521
5522#ifndef SV_HAS_TRAILING_NUL
5523# define SV_HAS_TRAILING_NUL 0
5524#endif
5525
5526#ifndef SV_COW_SHARED_HASH_KEYS
5527# define SV_COW_SHARED_HASH_KEYS 0
5528#endif
5529
5530#if (PERL_BCDVERSION < 0x5007002)
5531
5532#if defined(NEED_sv_2pv_flags)
5533static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5534static
5535#else
5536extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5537#endif
5538
5539#ifdef sv_2pv_flags
5540# undef sv_2pv_flags
5541#endif
5542#define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c)
5543#define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags)
5544
5545#if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL)
5546
5547char *
5548DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5549{
5550 STRLEN n_a = (STRLEN) flags;
5551 return sv_2pv(sv, lp ? lp : &n_a);
5552}
5553
5554#endif
5555
5556#if defined(NEED_sv_pvn_force_flags)
5557static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5558static
5559#else
5560extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
5561#endif
5562
5563#ifdef sv_pvn_force_flags
5564# undef sv_pvn_force_flags
5565#endif
5566#define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c)
5567#define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags)
5568
5569#if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL)
5570
5571char *
5572DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
5573{
5574 STRLEN n_a = (STRLEN) flags;
5575 return sv_pvn_force(sv, lp ? lp : &n_a);
5576}
5577
5578#endif
5579
5580#endif
5581
5582#if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
5583# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
5584#else
5585# define DPPP_SVPV_NOLEN_LP_ARG 0
5586#endif
5587#ifndef SvPV_const
5588# define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC)
5589#endif
5590
5591#ifndef SvPV_mutable
5592# define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC)
5593#endif
5594#ifndef SvPV_flags
5595# define SvPV_flags(sv, lp, flags) \
5596 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5597 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
5598#endif
5599#ifndef SvPV_flags_const
5600# define SvPV_flags_const(sv, lp, flags) \
5601 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5602 ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
5603 (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
5604#endif
5605#ifndef SvPV_flags_const_nolen
5606# define SvPV_flags_const_nolen(sv, flags) \
5607 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5608 ? SvPVX_const(sv) : \
5609 (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
5610#endif
5611#ifndef SvPV_flags_mutable
5612# define SvPV_flags_mutable(sv, lp, flags) \
5613 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5614 ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
5615 sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5616#endif
5617#ifndef SvPV_force
5618# define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC)
5619#endif
5620
5621#ifndef SvPV_force_nolen
5622# define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC)
5623#endif
5624
5625#ifndef SvPV_force_mutable
5626# define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
5627#endif
5628
5629#ifndef SvPV_force_nomg
5630# define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0)
5631#endif
5632
5633#ifndef SvPV_force_nomg_nolen
5634# define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0)
5635#endif
5636#ifndef SvPV_force_flags
5637# define SvPV_force_flags(sv, lp, flags) \
5638 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5639 ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
5640#endif
5641#ifndef SvPV_force_flags_nolen
5642# define SvPV_force_flags_nolen(sv, flags) \
5643 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5644 ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
5645#endif
5646#ifndef SvPV_force_flags_mutable
5647# define SvPV_force_flags_mutable(sv, lp, flags) \
5648 ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
5649 ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
5650 : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
5651#endif
5652#ifndef SvPV_nolen
5653# define SvPV_nolen(sv) \
5654 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5655 ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
5656#endif
5657#ifndef SvPV_nolen_const
5658# define SvPV_nolen_const(sv) \
5659 ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5660 ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
5661#endif
5662#ifndef SvPV_nomg
5663# define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
5664#endif
5665
5666#ifndef SvPV_nomg_const
5667# define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
5668#endif
5669
5670#ifndef SvPV_nomg_const_nolen
5671# define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0)
5672#endif
5673
5674#ifndef SvPV_nomg_nolen
5675# define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
5676 ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0))
5677#endif
5678#ifndef SvPV_renew
5679# define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \
5680 SvPV_set((sv), (char *) saferealloc( \
5681 (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
5682 } STMT_END
5683#endif
5684#ifndef SvMAGIC_set
5685# define SvMAGIC_set(sv, val) \
5686 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5687 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
5688#endif
5689
5690#if (PERL_BCDVERSION < 0x5009003)
5691#ifndef SvPVX_const
5692# define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv)))
5693#endif
5694
5695#ifndef SvPVX_mutable
5696# define SvPVX_mutable(sv) (0 + SvPVX(sv))
5697#endif
5698#ifndef SvRV_set
5699# define SvRV_set(sv, val) \
5700 STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5701 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
5702#endif
5703
5704#else
5705#ifndef SvPVX_const
5706# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv))
5707#endif
5708
5709#ifndef SvPVX_mutable
5710# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv)
5711#endif
5712#ifndef SvRV_set
5713# define SvRV_set(sv, val) \
5714 STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
5715 ((sv)->sv_u.svu_rv = (val)); } STMT_END
5716#endif
5717
5718#endif
5719#ifndef SvSTASH_set
5720# define SvSTASH_set(sv, val) \
5721 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
5722 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
5723#endif
5724
5725#if (PERL_BCDVERSION < 0x5004000)
5726#ifndef SvUV_set
5727# define SvUV_set(sv, val) \
5728 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5729 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
5730#endif
5731
5732#else
5733#ifndef SvUV_set
5734# define SvUV_set(sv, val) \
5735 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
5736 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
5737#endif
5738
5739#endif
5740
5741#if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
5742#if defined(NEED_vnewSVpvf)
5743static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5744static
5745#else
5746extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
5747#endif
5748
5749#ifdef vnewSVpvf
5750# undef vnewSVpvf
5751#endif
5752#define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
5753#define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
5754
5755#if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
5756
5757SV *
5758DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
5759{
5760 register SV *sv = newSV(0);
5761 sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
5762 return sv;
5763}
5764
5765#endif
5766#endif
5767
5768#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
5769# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5770#endif
5771
5772#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
5773# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
5774#endif
5775
5776#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
5777#if defined(NEED_sv_catpvf_mg)
5778static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5779static
5780#else
5781extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5782#endif
5783
5784#define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
5785
5786#if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
5787
5788void
5789DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5790{
5791 va_list args;
5792 va_start(args, pat);
5793 sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5794 SvSETMAGIC(sv);
5795 va_end(args);
5796}
5797
5798#endif
5799#endif
5800
5801#ifdef PERL_IMPLICIT_CONTEXT
5802#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
5803#if defined(NEED_sv_catpvf_mg_nocontext)
5804static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5805static
5806#else
5807extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5808#endif
5809
5810#define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5811#define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
5812
5813#if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
5814
5815void
5816DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5817{
5818 dTHX;
5819 va_list args;
5820 va_start(args, pat);
5821 sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5822 SvSETMAGIC(sv);
5823 va_end(args);
5824}
5825
5826#endif
5827#endif
5828#endif
5829
5830/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
5831#ifndef sv_catpvf_mg
5832# ifdef PERL_IMPLICIT_CONTEXT
5833# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
5834# else
5835# define sv_catpvf_mg Perl_sv_catpvf_mg
5836# endif
5837#endif
5838
5839#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
5840# define sv_vcatpvf_mg(sv, pat, args) \
5841 STMT_START { \
5842 sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5843 SvSETMAGIC(sv); \
5844 } STMT_END
5845#endif
5846
5847#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
5848#if defined(NEED_sv_setpvf_mg)
5849static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5850static
5851#else
5852extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
5853#endif
5854
5855#define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
5856
5857#if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
5858
5859void
5860DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
5861{
5862 va_list args;
5863 va_start(args, pat);
5864 sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5865 SvSETMAGIC(sv);
5866 va_end(args);
5867}
5868
5869#endif
5870#endif
5871
5872#ifdef PERL_IMPLICIT_CONTEXT
5873#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
5874#if defined(NEED_sv_setpvf_mg_nocontext)
5875static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5876static
5877#else
5878extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
5879#endif
5880
5881#define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5882#define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
5883
5884#if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
5885
5886void
5887DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
5888{
5889 dTHX;
5890 va_list args;
5891 va_start(args, pat);
5892 sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
5893 SvSETMAGIC(sv);
5894 va_end(args);
5895}
5896
5897#endif
5898#endif
5899#endif
5900
5901/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
5902#ifndef sv_setpvf_mg
5903# ifdef PERL_IMPLICIT_CONTEXT
5904# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
5905# else
5906# define sv_setpvf_mg Perl_sv_setpvf_mg
5907# endif
5908#endif
5909
5910#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
5911# define sv_vsetpvf_mg(sv, pat, args) \
5912 STMT_START { \
5913 sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
5914 SvSETMAGIC(sv); \
5915 } STMT_END
5916#endif
5917
5918/* Hint: newSVpvn_share
5919 * The SVs created by this function only mimic the behaviour of
5920 * shared PVs without really being shared. Only use if you know
5921 * what you're doing.
5922 */
5923
5924#ifndef newSVpvn_share
5925
5926#if defined(NEED_newSVpvn_share)
5927static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5928static
5929#else
5930extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
5931#endif
5932
5933#ifdef newSVpvn_share
5934# undef newSVpvn_share
5935#endif
5936#define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
5937#define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
5938
5939#if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
5940
5941SV *
5942DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash)
5943{
5944 SV *sv;
5945 if (len < 0)
5946 len = -len;
5947 if (!hash)
5948 PERL_HASH(hash, (char*) src, len);
5949 sv = newSVpvn((char *) src, len);
5950 sv_upgrade(sv, SVt_PVIV);
5951 SvIVX(sv) = hash;
5952 SvREADONLY_on(sv);
5953 SvPOK_on(sv);
5954 return sv;
5955}
5956
5957#endif
5958
5959#endif
5960#ifndef SvSHARED_HASH
5961# define SvSHARED_HASH(sv) (0 + SvUVX(sv))
5962#endif
5963#ifndef HvNAME_get
5964# define HvNAME_get(hv) HvNAME(hv)
5965#endif
5966#ifndef HvNAMELEN_get
5967# define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
5968#endif
5969
5970#ifndef gv_fetchpvn_flags
5971#if defined(NEED_gv_fetchpvn_flags)
5972static GV* DPPP_(my_gv_fetchpvn_flags)(pTHX_ const char* name, STRLEN len, int flags, int types);
5973static
5974#else
5975extern GV* DPPP_(my_gv_fetchpvn_flags)(pTHX_ const char* name, STRLEN len, int flags, int types);
5976#endif
5977
5978#ifdef gv_fetchpvn_flags
5979# undef gv_fetchpvn_flags
5980#endif
5981#define gv_fetchpvn_flags(a,b,c,d) DPPP_(my_gv_fetchpvn_flags)(aTHX_ a,b,c,d)
5982#define Perl_gv_fetchpvn_flags DPPP_(my_gv_fetchpvn_flags)
5983
5984#if defined(NEED_gv_fetchpvn_flags) || defined(NEED_gv_fetchpvn_flags_GLOBAL)
5985
5986GV*
5987DPPP_(my_gv_fetchpvn_flags)(pTHX_ const char* name, STRLEN len, int flags, int types) {
5988 char *namepv = savepvn(name, len);
5989 GV* stash = gv_fetchpv(namepv, TRUE, SVt_PVHV);
5990 Safefree(namepv);
5991 return stash;
5992}
5993
5994#endif
5995#endif
5996#ifndef GvSVn
5997# define GvSVn(gv) GvSV(gv)
5998#endif
5999
6000#ifndef isGV_with_GP
6001# define isGV_with_GP(gv) isGV(gv)
6002#endif
6003
6004#ifndef gv_fetchsv
6005# define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt)
6006#endif
6007#ifndef get_cvn_flags
6008# define get_cvn_flags(name, namelen, flags) get_cv(name, flags)
6009#endif
6010
6011#ifndef gv_init_pvn
6012# define gv_init_pvn(gv, stash, ptr, len, flags) gv_init(gv, stash, ptr, len, flags & GV_ADDMULTI ? TRUE : FALSE)
6013#endif
6014#ifndef WARN_ALL
6015# define WARN_ALL 0
6016#endif
6017
6018#ifndef WARN_CLOSURE
6019# define WARN_CLOSURE 1
6020#endif
6021
6022#ifndef WARN_DEPRECATED
6023# define WARN_DEPRECATED 2
6024#endif
6025
6026#ifndef WARN_EXITING
6027# define WARN_EXITING 3
6028#endif
6029
6030#ifndef WARN_GLOB
6031# define WARN_GLOB 4
6032#endif
6033
6034#ifndef WARN_IO
6035# define WARN_IO 5
6036#endif
6037
6038#ifndef WARN_CLOSED
6039# define WARN_CLOSED 6
6040#endif
6041
6042#ifndef WARN_EXEC
6043# define WARN_EXEC 7
6044#endif
6045
6046#ifndef WARN_LAYER
6047# define WARN_LAYER 8
6048#endif
6049
6050#ifndef WARN_NEWLINE
6051# define WARN_NEWLINE 9
6052#endif
6053
6054#ifndef WARN_PIPE
6055# define WARN_PIPE 10
6056#endif
6057
6058#ifndef WARN_UNOPENED
6059# define WARN_UNOPENED 11
6060#endif
6061
6062#ifndef WARN_MISC
6063# define WARN_MISC 12
6064#endif
6065
6066#ifndef WARN_NUMERIC
6067# define WARN_NUMERIC 13
6068#endif
6069
6070#ifndef WARN_ONCE
6071# define WARN_ONCE 14
6072#endif
6073
6074#ifndef WARN_OVERFLOW
6075# define WARN_OVERFLOW 15
6076#endif
6077
6078#ifndef WARN_PACK
6079# define WARN_PACK 16
6080#endif
6081
6082#ifndef WARN_PORTABLE
6083# define WARN_PORTABLE 17
6084#endif
6085
6086#ifndef WARN_RECURSION
6087# define WARN_RECURSION 18
6088#endif
6089
6090#ifndef WARN_REDEFINE
6091# define WARN_REDEFINE 19
6092#endif
6093
6094#ifndef WARN_REGEXP
6095# define WARN_REGEXP 20
6096#endif
6097
6098#ifndef WARN_SEVERE
6099# define WARN_SEVERE 21
6100#endif
6101
6102#ifndef WARN_DEBUGGING
6103# define WARN_DEBUGGING 22
6104#endif
6105
6106#ifndef WARN_INPLACE
6107# define WARN_INPLACE 23
6108#endif
6109
6110#ifndef WARN_INTERNAL
6111# define WARN_INTERNAL 24
6112#endif
6113
6114#ifndef WARN_MALLOC
6115# define WARN_MALLOC 25
6116#endif
6117
6118#ifndef WARN_SIGNAL
6119# define WARN_SIGNAL 26
6120#endif
6121
6122#ifndef WARN_SUBSTR
6123# define WARN_SUBSTR 27
6124#endif
6125
6126#ifndef WARN_SYNTAX
6127# define WARN_SYNTAX 28
6128#endif
6129
6130#ifndef WARN_AMBIGUOUS
6131# define WARN_AMBIGUOUS 29
6132#endif
6133
6134#ifndef WARN_BAREWORD
6135# define WARN_BAREWORD 30
6136#endif
6137
6138#ifndef WARN_DIGIT
6139# define WARN_DIGIT 31
6140#endif
6141
6142#ifndef WARN_PARENTHESIS
6143# define WARN_PARENTHESIS 32
6144#endif
6145
6146#ifndef WARN_PRECEDENCE
6147# define WARN_PRECEDENCE 33
6148#endif
6149
6150#ifndef WARN_PRINTF
6151# define WARN_PRINTF 34
6152#endif
6153
6154#ifndef WARN_PROTOTYPE
6155# define WARN_PROTOTYPE 35
6156#endif
6157
6158#ifndef WARN_QW
6159# define WARN_QW 36
6160#endif
6161
6162#ifndef WARN_RESERVED
6163# define WARN_RESERVED 37
6164#endif
6165
6166#ifndef WARN_SEMICOLON
6167# define WARN_SEMICOLON 38
6168#endif
6169
6170#ifndef WARN_TAINT
6171# define WARN_TAINT 39
6172#endif
6173
6174#ifndef WARN_THREADS
6175# define WARN_THREADS 40
6176#endif
6177
6178#ifndef WARN_UNINITIALIZED
6179# define WARN_UNINITIALIZED 41
6180#endif
6181
6182#ifndef WARN_UNPACK
6183# define WARN_UNPACK 42
6184#endif
6185
6186#ifndef WARN_UNTIE
6187# define WARN_UNTIE 43
6188#endif
6189
6190#ifndef WARN_UTF8
6191# define WARN_UTF8 44
6192#endif
6193
6194#ifndef WARN_VOID
6195# define WARN_VOID 45
6196#endif
6197
6198#ifndef WARN_ASSERTIONS
6199# define WARN_ASSERTIONS 46
6200#endif
6201#ifndef packWARN
6202# define packWARN(a) (a)
6203#endif
6204
6205#ifndef ckWARN
6206# ifdef G_WARN_ON
6207# define ckWARN(a) (PL_dowarn & G_WARN_ON)
6208# else
6209# define ckWARN(a) PL_dowarn
6210# endif
6211#endif
6212
6213#if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
6214#if defined(NEED_warner)
6215static void DPPP_(my_warner)(U32 err, const char *pat, ...);
6216static
6217#else
6218extern void DPPP_(my_warner)(U32 err, const char *pat, ...);
6219#endif
6220
6221#define Perl_warner DPPP_(my_warner)
6222
6223#if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
6224
6225void
6226DPPP_(my_warner)(U32 err, const char *pat, ...)
6227{
6228 SV *sv;
6229 va_list args;
6230
6231 PERL_UNUSED_ARG(err);
6232
6233 va_start(args, pat);
6234 sv = vnewSVpvf(pat, &args);
6235 va_end(args);
6236 sv_2mortal(sv);
6237 warn("%s", SvPV_nolen(sv));
6238}
6239
6240#define warner Perl_warner
6241
6242#define Perl_warner_nocontext Perl_warner
6243
6244#endif
6245#endif
6246
6247/* concatenating with "" ensures that only literal strings are accepted as argument
6248 * note that STR_WITH_LEN() can't be used as argument to macros or functions that
6249 * under some configurations might be macros
6250 */
6251#ifndef STR_WITH_LEN
6252# define STR_WITH_LEN(s) (s ""), (sizeof(s)-1)
6253#endif
6254#ifndef newSVpvs
6255# define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1)
6256#endif
6257
6258#ifndef newSVpvs_flags
6259# define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags)
6260#endif
6261
6262#ifndef newSVpvs_share
6263# define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0)
6264#endif
6265
6266#ifndef sv_catpvs
6267# define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1)
6268#endif
6269
6270#ifndef sv_setpvs
6271# define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1)
6272#endif
6273
6274#ifndef hv_fetchs
6275# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
6276#endif
6277
6278#ifndef hv_stores
6279# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0)
6280#endif
6281#ifndef gv_fetchpvs
6282# define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
6283#endif
6284
6285#ifndef gv_stashpvs
6286# define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags)
6287#endif
6288#ifndef get_cvs
6289# define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags)
6290#endif
6291#ifndef SvGETMAGIC
6292# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
6293#endif
6294
6295/* Some random bits for sv_unmagicext. These should probably be pulled in for
6296 real and organized at some point */
6297#ifndef HEf_SVKEY
6298# define HEf_SVKEY -2
6299#endif
6300
6301#ifndef MUTABLE_PTR
6302#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
6303# define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
6304#else
6305# define MUTABLE_PTR(p) ((void *) (p))
6306#endif
6307#endif
6308#ifndef MUTABLE_SV
6309# define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p))
6310#endif
6311
6312/* end of random bits */
6313#ifndef PERL_MAGIC_sv
6314# define PERL_MAGIC_sv '\0'
6315#endif
6316
6317#ifndef PERL_MAGIC_overload
6318# define PERL_MAGIC_overload 'A'
6319#endif
6320
6321#ifndef PERL_MAGIC_overload_elem
6322# define PERL_MAGIC_overload_elem 'a'
6323#endif
6324
6325#ifndef PERL_MAGIC_overload_table
6326# define PERL_MAGIC_overload_table 'c'
6327#endif
6328
6329#ifndef PERL_MAGIC_bm
6330# define PERL_MAGIC_bm 'B'
6331#endif
6332
6333#ifndef PERL_MAGIC_regdata
6334# define PERL_MAGIC_regdata 'D'
6335#endif
6336
6337#ifndef PERL_MAGIC_regdatum
6338# define PERL_MAGIC_regdatum 'd'
6339#endif
6340
6341#ifndef PERL_MAGIC_env
6342# define PERL_MAGIC_env 'E'
6343#endif
6344
6345#ifndef PERL_MAGIC_envelem
6346# define PERL_MAGIC_envelem 'e'
6347#endif
6348
6349#ifndef PERL_MAGIC_fm
6350# define PERL_MAGIC_fm 'f'
6351#endif
6352
6353#ifndef PERL_MAGIC_regex_global
6354# define PERL_MAGIC_regex_global 'g'
6355#endif
6356
6357#ifndef PERL_MAGIC_isa
6358# define PERL_MAGIC_isa 'I'
6359#endif
6360
6361#ifndef PERL_MAGIC_isaelem
6362# define PERL_MAGIC_isaelem 'i'
6363#endif
6364
6365#ifndef PERL_MAGIC_nkeys
6366# define PERL_MAGIC_nkeys 'k'
6367#endif
6368
6369#ifndef PERL_MAGIC_dbfile
6370# define PERL_MAGIC_dbfile 'L'
6371#endif
6372
6373#ifndef PERL_MAGIC_dbline
6374# define PERL_MAGIC_dbline 'l'
6375#endif
6376
6377#ifndef PERL_MAGIC_mutex
6378# define PERL_MAGIC_mutex 'm'
6379#endif
6380
6381#ifndef PERL_MAGIC_shared
6382# define PERL_MAGIC_shared 'N'
6383#endif
6384
6385#ifndef PERL_MAGIC_shared_scalar
6386# define PERL_MAGIC_shared_scalar 'n'
6387#endif
6388
6389#ifndef PERL_MAGIC_collxfrm
6390# define PERL_MAGIC_collxfrm 'o'
6391#endif
6392
6393#ifndef PERL_MAGIC_tied
6394# define PERL_MAGIC_tied 'P'
6395#endif
6396
6397#ifndef PERL_MAGIC_tiedelem
6398# define PERL_MAGIC_tiedelem 'p'
6399#endif
6400
6401#ifndef PERL_MAGIC_tiedscalar
6402# define PERL_MAGIC_tiedscalar 'q'
6403#endif
6404
6405#ifndef PERL_MAGIC_qr
6406# define PERL_MAGIC_qr 'r'
6407#endif
6408
6409#ifndef PERL_MAGIC_sig
6410# define PERL_MAGIC_sig 'S'
6411#endif
6412
6413#ifndef PERL_MAGIC_sigelem
6414# define PERL_MAGIC_sigelem 's'
6415#endif
6416
6417#ifndef PERL_MAGIC_taint
6418# define PERL_MAGIC_taint 't'
6419#endif
6420
6421#ifndef PERL_MAGIC_uvar
6422# define PERL_MAGIC_uvar 'U'
6423#endif
6424
6425#ifndef PERL_MAGIC_uvar_elem
6426# define PERL_MAGIC_uvar_elem 'u'
6427#endif
6428
6429#ifndef PERL_MAGIC_vstring
6430# define PERL_MAGIC_vstring 'V'
6431#endif
6432
6433#ifndef PERL_MAGIC_vec
6434# define PERL_MAGIC_vec 'v'
6435#endif
6436
6437#ifndef PERL_MAGIC_utf8
6438# define PERL_MAGIC_utf8 'w'
6439#endif
6440
6441#ifndef PERL_MAGIC_substr
6442# define PERL_MAGIC_substr 'x'
6443#endif
6444
6445#ifndef PERL_MAGIC_defelem
6446# define PERL_MAGIC_defelem 'y'
6447#endif
6448
6449#ifndef PERL_MAGIC_glob
6450# define PERL_MAGIC_glob '*'
6451#endif
6452
6453#ifndef PERL_MAGIC_arylen
6454# define PERL_MAGIC_arylen '#'
6455#endif
6456
6457#ifndef PERL_MAGIC_pos
6458# define PERL_MAGIC_pos '.'
6459#endif
6460
6461#ifndef PERL_MAGIC_backref
6462# define PERL_MAGIC_backref '<'
6463#endif
6464
6465#ifndef PERL_MAGIC_ext
6466# define PERL_MAGIC_ext '~'
6467#endif
6468
6469/* That's the best we can do... */
6470#ifndef sv_catpvn_nomg
6471# define sv_catpvn_nomg sv_catpvn
6472#endif
6473
6474#ifndef sv_catsv_nomg
6475# define sv_catsv_nomg sv_catsv
6476#endif
6477
6478#ifndef sv_setsv_nomg
6479# define sv_setsv_nomg sv_setsv
6480#endif
6481
6482#ifndef sv_pvn_nomg
6483# define sv_pvn_nomg sv_pvn
6484#endif
6485
6486#ifndef SvIV_nomg
6487# define SvIV_nomg SvIV
6488#endif
6489
6490#ifndef SvUV_nomg
6491# define SvUV_nomg SvUV
6492#endif
6493
6494#ifndef sv_catpv_mg
6495# define sv_catpv_mg(sv, ptr) \
6496 STMT_START { \
6497 SV *TeMpSv = sv; \
6498 sv_catpv(TeMpSv,ptr); \
6499 SvSETMAGIC(TeMpSv); \
6500 } STMT_END
6501#endif
6502
6503#ifndef sv_catpvn_mg
6504# define sv_catpvn_mg(sv, ptr, len) \
6505 STMT_START { \
6506 SV *TeMpSv = sv; \
6507 sv_catpvn(TeMpSv,ptr,len); \
6508 SvSETMAGIC(TeMpSv); \
6509 } STMT_END
6510#endif
6511
6512#ifndef sv_catsv_mg
6513# define sv_catsv_mg(dsv, ssv) \
6514 STMT_START { \
6515 SV *TeMpSv = dsv; \
6516 sv_catsv(TeMpSv,ssv); \
6517 SvSETMAGIC(TeMpSv); \
6518 } STMT_END
6519#endif
6520
6521#ifndef sv_setiv_mg
6522# define sv_setiv_mg(sv, i) \
6523 STMT_START { \
6524 SV *TeMpSv = sv; \
6525 sv_setiv(TeMpSv,i); \
6526 SvSETMAGIC(TeMpSv); \
6527 } STMT_END
6528#endif
6529
6530#ifndef sv_setnv_mg
6531# define sv_setnv_mg(sv, num) \
6532 STMT_START { \
6533 SV *TeMpSv = sv; \
6534 sv_setnv(TeMpSv,num); \
6535 SvSETMAGIC(TeMpSv); \
6536 } STMT_END
6537#endif
6538
6539#ifndef sv_setpv_mg
6540# define sv_setpv_mg(sv, ptr) \
6541 STMT_START { \
6542 SV *TeMpSv = sv; \
6543 sv_setpv(TeMpSv,ptr); \
6544 SvSETMAGIC(TeMpSv); \
6545 } STMT_END
6546#endif
6547
6548#ifndef sv_setpvn_mg
6549# define sv_setpvn_mg(sv, ptr, len) \
6550 STMT_START { \
6551 SV *TeMpSv = sv; \
6552 sv_setpvn(TeMpSv,ptr,len); \
6553 SvSETMAGIC(TeMpSv); \
6554 } STMT_END
6555#endif
6556
6557#ifndef sv_setsv_mg
6558# define sv_setsv_mg(dsv, ssv) \
6559 STMT_START { \
6560 SV *TeMpSv = dsv; \
6561 sv_setsv(TeMpSv,ssv); \
6562 SvSETMAGIC(TeMpSv); \
6563 } STMT_END
6564#endif
6565
6566#ifndef sv_setuv_mg
6567# define sv_setuv_mg(sv, i) \
6568 STMT_START { \
6569 SV *TeMpSv = sv; \
6570 sv_setuv(TeMpSv,i); \
6571 SvSETMAGIC(TeMpSv); \
6572 } STMT_END
6573#endif
6574
6575#ifndef sv_usepvn_mg
6576# define sv_usepvn_mg(sv, ptr, len) \
6577 STMT_START { \
6578 SV *TeMpSv = sv; \
6579 sv_usepvn(TeMpSv,ptr,len); \
6580 SvSETMAGIC(TeMpSv); \
6581 } STMT_END
6582#endif
6583#ifndef SvVSTRING_mg
6584# define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
6585#endif
6586
6587/* Hint: sv_magic_portable
6588 * This is a compatibility function that is only available with
6589 * Devel::PPPort. It is NOT in the perl core.
6590 * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
6591 * it is being passed a name pointer with namlen == 0. In that
6592 * case, perl 5.8.0 and later store the pointer, not a copy of it.
6593 * The compatibility can be provided back to perl 5.004. With
6594 * earlier versions, the code will not compile.
6595 */
6596
6597#if (PERL_BCDVERSION < 0x5004000)
6598
6599 /* code that uses sv_magic_portable will not compile */
6600
6601#elif (PERL_BCDVERSION < 0x5008000)
6602
6603# define sv_magic_portable(sv, obj, how, name, namlen) \
6604 STMT_START { \
6605 SV *SvMp_sv = (sv); \
6606 char *SvMp_name = (char *) (name); \
6607 I32 SvMp_namlen = (namlen); \
6608 if (SvMp_name && SvMp_namlen == 0) \
6609 { \
6610 MAGIC *mg; \
6611 sv_magic(SvMp_sv, obj, how, 0, 0); \
6612 mg = SvMAGIC(SvMp_sv); \
6613 mg->mg_len = -42; /* XXX: this is the tricky part */ \
6614 mg->mg_ptr = SvMp_name; \
6615 } \
6616 else \
6617 { \
6618 sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
6619 } \
6620 } STMT_END
6621
6622#else
6623
6624# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e)
6625
6626#endif
6627
6628#if !defined(mg_findext)
6629#if defined(NEED_mg_findext)
6630static MAGIC * DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl);
6631static
6632#else
6633extern MAGIC * DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl);
6634#endif
6635
6636#define mg_findext DPPP_(my_mg_findext)
6637#define Perl_mg_findext DPPP_(my_mg_findext)
6638
6639#if defined(NEED_mg_findext) || defined(NEED_mg_findext_GLOBAL)
6640
6641MAGIC *
6642DPPP_(my_mg_findext)(SV * sv, int type, const MGVTBL *vtbl) {
6643 if (sv) {
6644 MAGIC *mg;
6645
6646#ifdef AvPAD_NAMELIST
6647 assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv)));
6648#endif
6649
6650 for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) {
6651 if (mg->mg_type == type && mg->mg_virtual == vtbl)
6652 return mg;
6653 }
6654 }
6655
6656 return NULL;
6657}
6658
6659#endif
6660#endif
6661
6662#if !defined(sv_unmagicext)
6663#if defined(NEED_sv_unmagicext)
6664static int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
6665static
6666#else
6667extern int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl);
6668#endif
6669
6670#ifdef sv_unmagicext
6671# undef sv_unmagicext
6672#endif
6673#define sv_unmagicext(a,b,c) DPPP_(my_sv_unmagicext)(aTHX_ a,b,c)
6674#define Perl_sv_unmagicext DPPP_(my_sv_unmagicext)
6675
6676#if defined(NEED_sv_unmagicext) || defined(NEED_sv_unmagicext_GLOBAL)
6677
6678int
6679DPPP_(my_sv_unmagicext)(pTHX_ SV *const sv, const int type, MGVTBL *vtbl)
6680{
6681 MAGIC* mg;
6682 MAGIC** mgp;
6683
6684 if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv))
6685 return 0;
6686 mgp = &(SvMAGIC(sv));
6687 for (mg = *mgp; mg; mg = *mgp) {
6688 const MGVTBL* const virt = mg->mg_virtual;
6689 if (mg->mg_type == type && virt == vtbl) {
6690 *mgp = mg->mg_moremagic;
6691 if (virt && virt->svt_free)
6692 virt->svt_free(aTHX_ sv, mg);
6693 if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
6694 if (mg->mg_len > 0)
6695 Safefree(mg->mg_ptr);
6696 else if (mg->mg_len == HEf_SVKEY) /* Questionable on older perls... */
6697 SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr));
6698 else if (mg->mg_type == PERL_MAGIC_utf8)
6699 Safefree(mg->mg_ptr);
6700 }
6701 if (mg->mg_flags & MGf_REFCOUNTED)
6702 SvREFCNT_dec(mg->mg_obj);
6703 Safefree(mg);
6704 }
6705 else
6706 mgp = &mg->mg_moremagic;
6707 }
6708 if (SvMAGIC(sv)) {
6709 if (SvMAGICAL(sv)) /* if we're under save_magic, wait for restore_magic; */
6710 mg_magical(sv); /* else fix the flags now */
6711 }
6712 else {
6713 SvMAGICAL_off(sv);
6714 SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
6715 }
6716 return 0;
6717}
6718
6719#endif
6720#endif
6721
6722#ifdef USE_ITHREADS
6723#ifndef CopFILE
6724# define CopFILE(c) ((c)->cop_file)
6725#endif
6726
6727#ifndef CopFILEGV
6728# define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
6729#endif
6730
6731#ifndef CopFILE_set
6732# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
6733#endif
6734
6735#ifndef CopFILESV
6736# define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
6737#endif
6738
6739#ifndef CopFILEAV
6740# define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
6741#endif
6742
6743#ifndef CopSTASHPV
6744# define CopSTASHPV(c) ((c)->cop_stashpv)
6745#endif
6746
6747#ifndef CopSTASHPV_set
6748# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
6749#endif
6750
6751#ifndef CopSTASH
6752# define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
6753#endif
6754
6755#ifndef CopSTASH_set
6756# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
6757#endif
6758
6759#ifndef CopSTASH_eq
6760# define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
6761 || (CopSTASHPV(c) && HvNAME(hv) \
6762 && strEQ(CopSTASHPV(c), HvNAME(hv)))))
6763#endif
6764
6765#else
6766#ifndef CopFILEGV
6767# define CopFILEGV(c) ((c)->cop_filegv)
6768#endif
6769
6770#ifndef CopFILEGV_set
6771# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
6772#endif
6773
6774#ifndef CopFILE_set
6775# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv))
6776#endif
6777
6778#ifndef CopFILESV
6779# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
6780#endif
6781
6782#ifndef CopFILEAV
6783# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
6784#endif
6785
6786#ifndef CopFILE
6787# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
6788#endif
6789
6790#ifndef CopSTASH
6791# define CopSTASH(c) ((c)->cop_stash)
6792#endif
6793
6794#ifndef CopSTASH_set
6795# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
6796#endif
6797
6798#ifndef CopSTASHPV
6799# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
6800#endif
6801
6802#ifndef CopSTASHPV_set
6803# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
6804#endif
6805
6806#ifndef CopSTASH_eq
6807# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv))
6808#endif
6809
6810#endif /* USE_ITHREADS */
6811
6812#if (PERL_BCDVERSION >= 0x5006000)
6813#ifndef caller_cx
6814
6815# if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
6816static I32
6817DPPP_dopoptosub_at(const PERL_CONTEXT *cxstk, I32 startingblock)
6818{
6819 I32 i;
6820
6821 for (i = startingblock; i >= 0; i--) {
6822 register const PERL_CONTEXT * const cx = &cxstk[i];
6823 switch (CxTYPE(cx)) {
6824 default:
6825 continue;
6826 case CXt_EVAL:
6827 case CXt_SUB:
6828 case CXt_FORMAT:
6829 return i;
6830 }
6831 }
6832 return i;
6833}
6834# endif
6835
6836# if defined(NEED_caller_cx)
6837static const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp);
6838static
6839#else
6840extern const PERL_CONTEXT * DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp);
6841#endif
6842
6843#ifdef caller_cx
6844# undef caller_cx
6845#endif
6846#define caller_cx(a,b) DPPP_(my_caller_cx)(aTHX_ a,b)
6847#define Perl_caller_cx DPPP_(my_caller_cx)
6848
6849#if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
6850
6851const PERL_CONTEXT *
6852DPPP_(my_caller_cx)(pTHX_ I32 count, const PERL_CONTEXT **dbcxp)
6853{
6854 register I32 cxix = DPPP_dopoptosub_at(cxstack, cxstack_ix);
6855 register const PERL_CONTEXT *cx;
6856 register const PERL_CONTEXT *ccstack = cxstack;
6857 const PERL_SI *top_si = PL_curstackinfo;
6858
6859 for (;;) {
6860 /* we may be in a higher stacklevel, so dig down deeper */
6861 while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
6862 top_si = top_si->si_prev;
6863 ccstack = top_si->si_cxstack;
6864 cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
6865 }
6866 if (cxix < 0)
6867 return NULL;
6868 /* caller() should not report the automatic calls to &DB::sub */
6869 if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
6870 ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
6871 count++;
6872 if (!count--)
6873 break;
6874 cxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
6875 }
6876
6877 cx = &ccstack[cxix];
6878 if (dbcxp) *dbcxp = cx;
6879
6880 if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
6881 const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
6882 /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
6883 field below is defined for any cx. */
6884 /* caller() should not report the automatic calls to &DB::sub */
6885 if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
6886 cx = &ccstack[dbcxix];
6887 }
6888
6889 return cx;
6890}
6891
6892# endif
6893#endif /* caller_cx */
6894#endif /* 5.6.0 */
6895#ifndef IN_PERL_COMPILETIME
6896# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling)
6897#endif
6898
6899#ifndef IN_LOCALE_RUNTIME
6900# define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE)
6901#endif
6902
6903#ifndef IN_LOCALE_COMPILETIME
6904# define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE)
6905#endif
6906
6907#ifndef IN_LOCALE
6908# define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
6909#endif
6910#ifndef IS_NUMBER_IN_UV
6911# define IS_NUMBER_IN_UV 0x01
6912#endif
6913
6914#ifndef IS_NUMBER_GREATER_THAN_UV_MAX
6915# define IS_NUMBER_GREATER_THAN_UV_MAX 0x02
6916#endif
6917
6918#ifndef IS_NUMBER_NOT_INT
6919# define IS_NUMBER_NOT_INT 0x04
6920#endif
6921
6922#ifndef IS_NUMBER_NEG
6923# define IS_NUMBER_NEG 0x08
6924#endif
6925
6926#ifndef IS_NUMBER_INFINITY
6927# define IS_NUMBER_INFINITY 0x10
6928#endif
6929
6930#ifndef IS_NUMBER_NAN
6931# define IS_NUMBER_NAN 0x20
6932#endif
6933#ifndef GROK_NUMERIC_RADIX
6934# define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
6935#endif
6936#ifndef PERL_SCAN_GREATER_THAN_UV_MAX
6937# define PERL_SCAN_GREATER_THAN_UV_MAX 0x02
6938#endif
6939
6940#ifndef PERL_SCAN_SILENT_ILLDIGIT
6941# define PERL_SCAN_SILENT_ILLDIGIT 0x04
6942#endif
6943
6944#ifndef PERL_SCAN_ALLOW_UNDERSCORES
6945# define PERL_SCAN_ALLOW_UNDERSCORES 0x01
6946#endif
6947
6948#ifndef PERL_SCAN_DISALLOW_PREFIX
6949# define PERL_SCAN_DISALLOW_PREFIX 0x02
6950#endif
6951
6952#ifndef grok_numeric_radix
6953#if defined(NEED_grok_numeric_radix)
6954static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6955static
6956#else
6957extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
6958#endif
6959
6960#ifdef grok_numeric_radix
6961# undef grok_numeric_radix
6962#endif
6963#define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
6964#define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
6965
6966#if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
6967bool
6968DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
6969{
6970#ifdef USE_LOCALE_NUMERIC
6971#ifdef PL_numeric_radix_sv
6972 if (PL_numeric_radix_sv && IN_LOCALE) {
6973 STRLEN len;
6974 char* radix = SvPV(PL_numeric_radix_sv, len);
6975 if (*sp + len <= send && memEQ(*sp, radix, len)) {
6976 *sp += len;
6977 return TRUE;
6978 }
6979 }
6980#else
6981 /* older perls don't have PL_numeric_radix_sv so the radix
6982 * must manually be requested from locale.h
6983 */
6984#include <locale.h>
6985 dTHR; /* needed for older threaded perls */
6986 struct lconv *lc = localeconv();
6987 char *radix = lc->decimal_point;
6988 if (radix && IN_LOCALE) {
6989 STRLEN len = strlen(radix);
6990 if (*sp + len <= send && memEQ(*sp, radix, len)) {
6991 *sp += len;
6992 return TRUE;
6993 }
6994 }
6995#endif
6996#endif /* USE_LOCALE_NUMERIC */
6997 /* always try "." if numeric radix didn't match because
6998 * we may have data from different locales mixed */
6999 if (*sp < send && **sp == '.') {
7000 ++*sp;
7001 return TRUE;
7002 }
7003 return FALSE;
7004}
7005#endif
7006#endif
7007
7008#ifndef grok_number
7009#if defined(NEED_grok_number)
7010static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
7011static
7012#else
7013extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
7014#endif
7015
7016#ifdef grok_number
7017# undef grok_number
7018#endif
7019#define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
7020#define Perl_grok_number DPPP_(my_grok_number)
7021
7022#if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
7023int
7024DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
7025{
7026 const char *s = pv;
7027 const char *send = pv + len;
7028 const UV max_div_10 = UV_MAX / 10;
7029 const char max_mod_10 = UV_MAX % 10;
7030 int numtype = 0;
7031 int sawinf = 0;
7032 int sawnan = 0;
7033
7034 while (s < send && isSPACE(*s))
7035 s++;
7036 if (s == send) {
7037 return 0;
7038 } else if (*s == '-') {
7039 s++;
7040 numtype = IS_NUMBER_NEG;
7041 }
7042 else if (*s == '+')
7043 s++;
7044
7045 if (s == send)
7046 return 0;
7047
7048 /* next must be digit or the radix separator or beginning of infinity */
7049 if (isDIGIT(*s)) {
7050 /* UVs are at least 32 bits, so the first 9 decimal digits cannot
7051 overflow. */
7052 UV value = *s - '0';
7053 /* This construction seems to be more optimiser friendly.
7054 (without it gcc does the isDIGIT test and the *s - '0' separately)
7055 With it gcc on arm is managing 6 instructions (6 cycles) per digit.
7056 In theory the optimiser could deduce how far to unroll the loop
7057 before checking for overflow. */
7058 if (++s < send) {
7059 int digit = *s - '0';
7060 if (digit >= 0 && digit <= 9) {
7061 value = value * 10 + digit;
7062 if (++s < send) {
7063 digit = *s - '0';
7064 if (digit >= 0 && digit <= 9) {
7065 value = value * 10 + digit;
7066 if (++s < send) {
7067 digit = *s - '0';
7068 if (digit >= 0 && digit <= 9) {
7069 value = value * 10 + digit;
7070 if (++s < send) {
7071 digit = *s - '0';
7072 if (digit >= 0 && digit <= 9) {
7073 value = value * 10 + digit;
7074 if (++s < send) {
7075 digit = *s - '0';
7076 if (digit >= 0 && digit <= 9) {
7077 value = value * 10 + digit;
7078 if (++s < send) {
7079 digit = *s - '0';
7080 if (digit >= 0 && digit <= 9) {
7081 value = value * 10 + digit;
7082 if (++s < send) {
7083 digit = *s - '0';
7084 if (digit >= 0 && digit <= 9) {
7085 value = value * 10 + digit;
7086 if (++s < send) {
7087 digit = *s - '0';
7088 if (digit >= 0 && digit <= 9) {
7089 value = value * 10 + digit;
7090 if (++s < send) {
7091 /* Now got 9 digits, so need to check
7092 each time for overflow. */
7093 digit = *s - '0';
7094 while (digit >= 0 && digit <= 9
7095 && (value < max_div_10
7096 || (value == max_div_10
7097 && digit <= max_mod_10))) {
7098 value = value * 10 + digit;
7099 if (++s < send)
7100 digit = *s - '0';
7101 else
7102 break;
7103 }
7104 if (digit >= 0 && digit <= 9
7105 && (s < send)) {
7106 /* value overflowed.
7107 skip the remaining digits, don't
7108 worry about setting *valuep. */
7109 do {
7110 s++;
7111 } while (s < send && isDIGIT(*s));
7112 numtype |=
7113 IS_NUMBER_GREATER_THAN_UV_MAX;
7114 goto skip_value;
7115 }
7116 }
7117 }
7118 }
7119 }
7120 }
7121 }
7122 }
7123 }
7124 }
7125 }
7126 }
7127 }
7128 }
7129 }
7130 }
7131 }
7132 }
7133 numtype |= IS_NUMBER_IN_UV;
7134 if (valuep)
7135 *valuep = value;
7136
7137 skip_value:
7138 if (GROK_NUMERIC_RADIX(&s, send)) {
7139 numtype |= IS_NUMBER_NOT_INT;
7140 while (s < send && isDIGIT(*s)) /* optional digits after the radix */
7141 s++;
7142 }
7143 }
7144 else if (GROK_NUMERIC_RADIX(&s, send)) {
7145 numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
7146 /* no digits before the radix means we need digits after it */
7147 if (s < send && isDIGIT(*s)) {
7148 do {
7149 s++;
7150 } while (s < send && isDIGIT(*s));
7151 if (valuep) {
7152 /* integer approximation is valid - it's 0. */
7153 *valuep = 0;
7154 }
7155 }
7156 else
7157 return 0;
7158 } else if (*s == 'I' || *s == 'i') {
7159 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7160 s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
7161 s++; if (s < send && (*s == 'I' || *s == 'i')) {
7162 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7163 s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
7164 s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
7165 s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
7166 s++;
7167 }
7168 sawinf = 1;
7169 } else if (*s == 'N' || *s == 'n') {
7170 /* XXX TODO: There are signaling NaNs and quiet NaNs. */
7171 s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
7172 s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7173 s++;
7174 sawnan = 1;
7175 } else
7176 return 0;
7177
7178 if (sawinf) {
7179 numtype &= IS_NUMBER_NEG; /* Keep track of sign */
7180 numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
7181 } else if (sawnan) {
7182 numtype &= IS_NUMBER_NEG; /* Keep track of sign */
7183 numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
7184 } else if (s < send) {
7185 /* we can have an optional exponent part */
7186 if (*s == 'e' || *s == 'E') {
7187 /* The only flag we keep is sign. Blow away any "it's UV" */
7188 numtype &= IS_NUMBER_NEG;
7189 numtype |= IS_NUMBER_NOT_INT;
7190 s++;
7191 if (s < send && (*s == '-' || *s == '+'))
7192 s++;
7193 if (s < send && isDIGIT(*s)) {
7194 do {
7195 s++;
7196 } while (s < send && isDIGIT(*s));
7197 }
7198 else
7199 return 0;
7200 }
7201 }
7202 while (s < send && isSPACE(*s))
7203 s++;
7204 if (s >= send)
7205 return numtype;
7206 if (len == 10 && memEQ(pv, "0 but true", 10)) {
7207 if (valuep)
7208 *valuep = 0;
7209 return IS_NUMBER_IN_UV;
7210 }
7211 return 0;
7212}
7213#endif
7214#endif
7215
7216/*
7217 * The grok_* routines have been modified to use warn() instead of
7218 * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
7219 * which is why the stack variable has been renamed to 'xdigit'.
7220 */
7221
7222#ifndef grok_bin
7223#if defined(NEED_grok_bin)
7224static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7225static
7226#else
7227extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7228#endif
7229
7230#ifdef grok_bin
7231# undef grok_bin
7232#endif
7233#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
7234#define Perl_grok_bin DPPP_(my_grok_bin)
7235
7236#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
7237UV
7238DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7239{
7240 const char *s = start;
7241 STRLEN len = *len_p;
7242 UV value = 0;
7243 NV value_nv = 0;
7244
7245 const UV max_div_2 = UV_MAX / 2;
7246 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7247 bool overflowed = FALSE;
7248
7249 if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7250 /* strip off leading b or 0b.
7251 for compatibility silently suffer "b" and "0b" as valid binary
7252 numbers. */
7253 if (len >= 1) {
7254 if (s[0] == 'b') {
7255 s++;
7256 len--;
7257 }
7258 else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
7259 s+=2;
7260 len-=2;
7261 }
7262 }
7263 }
7264
7265 for (; len-- && *s; s++) {
7266 char bit = *s;
7267 if (bit == '0' || bit == '1') {
7268 /* Write it in this wonky order with a goto to attempt to get the
7269 compiler to make the common case integer-only loop pretty tight.
7270 With gcc seems to be much straighter code than old scan_bin. */
7271 redo:
7272 if (!overflowed) {
7273 if (value <= max_div_2) {
7274 value = (value << 1) | (bit - '0');
7275 continue;
7276 }
7277 /* Bah. We're just overflowed. */
7278 warn("Integer overflow in binary number");
7279 overflowed = TRUE;
7280 value_nv = (NV) value;
7281 }
7282 value_nv *= 2.0;
7283 /* If an NV has not enough bits in its mantissa to
7284 * represent a UV this summing of small low-order numbers
7285 * is a waste of time (because the NV cannot preserve
7286 * the low-order bits anyway): we could just remember when
7287 * did we overflow and in the end just multiply value_nv by the
7288 * right amount. */
7289 value_nv += (NV)(bit - '0');
7290 continue;
7291 }
7292 if (bit == '_' && len && allow_underscores && (bit = s[1])
7293 && (bit == '0' || bit == '1'))
7294 {
7295 --len;
7296 ++s;
7297 goto redo;
7298 }
7299 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7300 warn("Illegal binary digit '%c' ignored", *s);
7301 break;
7302 }
7303
7304 if ( ( overflowed && value_nv > 4294967295.0)
7305#if UVSIZE > 4
7306 || (!overflowed && value > 0xffffffff )
7307#endif
7308 ) {
7309 warn("Binary number > 0b11111111111111111111111111111111 non-portable");
7310 }
7311 *len_p = s - start;
7312 if (!overflowed) {
7313 *flags = 0;
7314 return value;
7315 }
7316 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7317 if (result)
7318 *result = value_nv;
7319 return UV_MAX;
7320}
7321#endif
7322#endif
7323
7324#ifndef grok_hex
7325#if defined(NEED_grok_hex)
7326static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7327static
7328#else
7329extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7330#endif
7331
7332#ifdef grok_hex
7333# undef grok_hex
7334#endif
7335#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
7336#define Perl_grok_hex DPPP_(my_grok_hex)
7337
7338#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
7339UV
7340DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7341{
7342 const char *s = start;
7343 STRLEN len = *len_p;
7344 UV value = 0;
7345 NV value_nv = 0;
7346
7347 const UV max_div_16 = UV_MAX / 16;
7348 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7349 bool overflowed = FALSE;
7350 const char *xdigit;
7351
7352 if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7353 /* strip off leading x or 0x.
7354 for compatibility silently suffer "x" and "0x" as valid hex numbers.
7355 */
7356 if (len >= 1) {
7357 if (s[0] == 'x') {
7358 s++;
7359 len--;
7360 }
7361 else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
7362 s+=2;
7363 len-=2;
7364 }
7365 }
7366 }
7367
7368 for (; len-- && *s; s++) {
7369 xdigit = strchr((char *) PL_hexdigit, *s);
7370 if (xdigit) {
7371 /* Write it in this wonky order with a goto to attempt to get the
7372 compiler to make the common case integer-only loop pretty tight.
7373 With gcc seems to be much straighter code than old scan_hex. */
7374 redo:
7375 if (!overflowed) {
7376 if (value <= max_div_16) {
7377 value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
7378 continue;
7379 }
7380 warn("Integer overflow in hexadecimal number");
7381 overflowed = TRUE;
7382 value_nv = (NV) value;
7383 }
7384 value_nv *= 16.0;
7385 /* If an NV has not enough bits in its mantissa to
7386 * represent a UV this summing of small low-order numbers
7387 * is a waste of time (because the NV cannot preserve
7388 * the low-order bits anyway): we could just remember when
7389 * did we overflow and in the end just multiply value_nv by the
7390 * right amount of 16-tuples. */
7391 value_nv += (NV)((xdigit - PL_hexdigit) & 15);
7392 continue;
7393 }
7394 if (*s == '_' && len && allow_underscores && s[1]
7395 && (xdigit = strchr((char *) PL_hexdigit, s[1])))
7396 {
7397 --len;
7398 ++s;
7399 goto redo;
7400 }
7401 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7402 warn("Illegal hexadecimal digit '%c' ignored", *s);
7403 break;
7404 }
7405
7406 if ( ( overflowed && value_nv > 4294967295.0)
7407#if UVSIZE > 4
7408 || (!overflowed && value > 0xffffffff )
7409#endif
7410 ) {
7411 warn("Hexadecimal number > 0xffffffff non-portable");
7412 }
7413 *len_p = s - start;
7414 if (!overflowed) {
7415 *flags = 0;
7416 return value;
7417 }
7418 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7419 if (result)
7420 *result = value_nv;
7421 return UV_MAX;
7422}
7423#endif
7424#endif
7425
7426#ifndef grok_oct
7427#if defined(NEED_grok_oct)
7428static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7429static
7430#else
7431extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7432#endif
7433
7434#ifdef grok_oct
7435# undef grok_oct
7436#endif
7437#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
7438#define Perl_grok_oct DPPP_(my_grok_oct)
7439
7440#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
7441UV
7442DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7443{
7444 const char *s = start;
7445 STRLEN len = *len_p;
7446 UV value = 0;
7447 NV value_nv = 0;
7448
7449 const UV max_div_8 = UV_MAX / 8;
7450 bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7451 bool overflowed = FALSE;
7452
7453 for (; len-- && *s; s++) {
7454 /* gcc 2.95 optimiser not smart enough to figure that this subtraction
7455 out front allows slicker code. */
7456 int digit = *s - '0';
7457 if (digit >= 0 && digit <= 7) {
7458 /* Write it in this wonky order with a goto to attempt to get the
7459 compiler to make the common case integer-only loop pretty tight.
7460 */
7461 redo:
7462 if (!overflowed) {
7463 if (value <= max_div_8) {
7464 value = (value << 3) | digit;
7465 continue;
7466 }
7467 /* Bah. We're just overflowed. */
7468 warn("Integer overflow in octal number");
7469 overflowed = TRUE;
7470 value_nv = (NV) value;
7471 }
7472 value_nv *= 8.0;
7473 /* If an NV has not enough bits in its mantissa to
7474 * represent a UV this summing of small low-order numbers
7475 * is a waste of time (because the NV cannot preserve
7476 * the low-order bits anyway): we could just remember when
7477 * did we overflow and in the end just multiply value_nv by the
7478 * right amount of 8-tuples. */
7479 value_nv += (NV)digit;
7480 continue;
7481 }
7482 if (digit == ('_' - '0') && len && allow_underscores
7483 && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
7484 {
7485 --len;
7486 ++s;
7487 goto redo;
7488 }
7489 /* Allow \octal to work the DWIM way (that is, stop scanning
7490 * as soon as non-octal characters are seen, complain only iff
7491 * someone seems to want to use the digits eight and nine). */
7492 if (digit == 8 || digit == 9) {
7493 if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7494 warn("Illegal octal digit '%c' ignored", *s);
7495 }
7496 break;
7497 }
7498
7499 if ( ( overflowed && value_nv > 4294967295.0)
7500#if UVSIZE > 4
7501 || (!overflowed && value > 0xffffffff )
7502#endif
7503 ) {
7504 warn("Octal number > 037777777777 non-portable");
7505 }
7506 *len_p = s - start;
7507 if (!overflowed) {
7508 *flags = 0;
7509 return value;
7510 }
7511 *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7512 if (result)
7513 *result = value_nv;
7514 return UV_MAX;
7515}
7516#endif
7517#endif
7518
7519#if !defined(my_snprintf)
7520#if defined(NEED_my_snprintf)
7521static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7522static
7523#else
7524extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7525#endif
7526
7527#define my_snprintf DPPP_(my_my_snprintf)
7528#define Perl_my_snprintf DPPP_(my_my_snprintf)
7529
7530#if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
7531
7532int
7533DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
7534{
7535 dTHX;
7536 int retval;
7537 va_list ap;
7538 va_start(ap, format);
7539#ifdef HAS_VSNPRINTF
7540 retval = vsnprintf(buffer, len, format, ap);
7541#else
7542 retval = vsprintf(buffer, format, ap);
7543#endif
7544 va_end(ap);
7545 if (retval < 0 || (len > 0 && (Size_t)retval >= len))
7546 Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
7547 return retval;
7548}
7549
7550#endif
7551#endif
7552
7553#if !defined(my_sprintf)
7554#if defined(NEED_my_sprintf)
7555static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7556static
7557#else
7558extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7559#endif
7560
7561#define my_sprintf DPPP_(my_my_sprintf)
7562#define Perl_my_sprintf DPPP_(my_my_sprintf)
7563
7564#if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
7565
7566int
7567DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
7568{
7569 va_list args;
7570 va_start(args, pat);
7571 vsprintf(buffer, pat, args);
7572 va_end(args);
7573 return strlen(buffer);
7574}
7575
7576#endif
7577#endif
7578
7579#ifdef NO_XSLOCKS
7580# ifdef dJMPENV
7581# define dXCPT dJMPENV; int rEtV = 0
7582# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0)
7583# define XCPT_TRY_END JMPENV_POP;
7584# define XCPT_CATCH if (rEtV != 0)
7585# define XCPT_RETHROW JMPENV_JUMP(rEtV)
7586# else
7587# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0
7588# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
7589# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf);
7590# define XCPT_CATCH if (rEtV != 0)
7591# define XCPT_RETHROW Siglongjmp(top_env, rEtV)
7592# endif
7593#endif
7594
7595#if !defined(my_strlcat)
7596#if defined(NEED_my_strlcat)
7597static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7598static
7599#else
7600extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7601#endif
7602
7603#define my_strlcat DPPP_(my_my_strlcat)
7604#define Perl_my_strlcat DPPP_(my_my_strlcat)
7605
7606#if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
7607
7608Size_t
7609DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
7610{
7611 Size_t used, length, copy;
7612
7613 used = strlen(dst);
7614 length = strlen(src);
7615 if (size > 0 && used < size - 1) {
7616 copy = (length >= size - used) ? size - used - 1 : length;
7617 memcpy(dst + used, src, copy);
7618 dst[used + copy] = '\0';
7619 }
7620 return used + length;
7621}
7622#endif
7623#endif
7624
7625#if !defined(my_strlcpy)
7626#if defined(NEED_my_strlcpy)
7627static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7628static
7629#else
7630extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7631#endif
7632
7633#define my_strlcpy DPPP_(my_my_strlcpy)
7634#define Perl_my_strlcpy DPPP_(my_my_strlcpy)
7635
7636#if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
7637
7638Size_t
7639DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
7640{
7641 Size_t length, copy;
7642
7643 length = strlen(src);
7644 if (size > 0) {
7645 copy = (length >= size) ? size - 1 : length;
7646 memcpy(dst, src, copy);
7647 dst[copy] = '\0';
7648 }
7649 return length;
7650}
7651
7652#endif
7653#endif
7654#ifndef PERL_PV_ESCAPE_QUOTE
7655# define PERL_PV_ESCAPE_QUOTE 0x0001
7656#endif
7657
7658#ifndef PERL_PV_PRETTY_QUOTE
7659# define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
7660#endif
7661
7662#ifndef PERL_PV_PRETTY_ELLIPSES
7663# define PERL_PV_PRETTY_ELLIPSES 0x0002
7664#endif
7665
7666#ifndef PERL_PV_PRETTY_LTGT
7667# define PERL_PV_PRETTY_LTGT 0x0004
7668#endif
7669
7670#ifndef PERL_PV_ESCAPE_FIRSTCHAR
7671# define PERL_PV_ESCAPE_FIRSTCHAR 0x0008
7672#endif
7673
7674#ifndef PERL_PV_ESCAPE_UNI
7675# define PERL_PV_ESCAPE_UNI 0x0100
7676#endif
7677
7678#ifndef PERL_PV_ESCAPE_UNI_DETECT
7679# define PERL_PV_ESCAPE_UNI_DETECT 0x0200
7680#endif
7681
7682#ifndef PERL_PV_ESCAPE_ALL
7683# define PERL_PV_ESCAPE_ALL 0x1000
7684#endif
7685
7686#ifndef PERL_PV_ESCAPE_NOBACKSLASH
7687# define PERL_PV_ESCAPE_NOBACKSLASH 0x2000
7688#endif
7689
7690#ifndef PERL_PV_ESCAPE_NOCLEAR
7691# define PERL_PV_ESCAPE_NOCLEAR 0x4000
7692#endif
7693
7694#ifndef PERL_PV_ESCAPE_RE
7695# define PERL_PV_ESCAPE_RE 0x8000
7696#endif
7697
7698#ifndef PERL_PV_PRETTY_NOCLEAR
7699# define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR
7700#endif
7701#ifndef PERL_PV_PRETTY_DUMP
7702# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
7703#endif
7704
7705#ifndef PERL_PV_PRETTY_REGPROP
7706# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
7707#endif
7708
7709/* Hint: pv_escape
7710 * Note that unicode functionality is only backported to
7711 * those perl versions that support it. For older perl
7712 * versions, the implementation will fall back to bytes.
7713 */
7714
7715#ifndef pv_escape
7716#if defined(NEED_pv_escape)
7717static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7718static
7719#else
7720extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
7721#endif
7722
7723#ifdef pv_escape
7724# undef pv_escape
7725#endif
7726#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
7727#define Perl_pv_escape DPPP_(my_pv_escape)
7728
7729#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
7730
7731char *
7732DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
7733 const STRLEN count, const STRLEN max,
7734 STRLEN * const escaped, const U32 flags)
7735{
7736 const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
7737 const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
7738 char octbuf[32] = "%123456789ABCDF";
7739 STRLEN wrote = 0;
7740 STRLEN chsize = 0;
7741 STRLEN readsize = 1;
7742#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7743 bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
7744#endif
7745 const char *pv = str;
7746 const char * const end = pv + count;
7747 octbuf[0] = esc;
7748
7749 if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
7750 sv_setpvs(dsv, "");
7751
7752#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7753 if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
7754 isuni = 1;
7755#endif
7756
7757 for (; pv < end && (!max || wrote < max) ; pv += readsize) {
7758 const UV u =
7759#if defined(is_utf8_string) && defined(utf8_to_uvchr)
7760 isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
7761#endif
7762 (U8)*pv;
7763 const U8 c = (U8)u & 0xFF;
7764
7765 if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
7766 if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7767 chsize = my_snprintf(octbuf, sizeof octbuf,
7768 "%" UVxf, u);
7769 else
7770 chsize = my_snprintf(octbuf, sizeof octbuf,
7771 "%cx{%" UVxf "}", esc, u);
7772 } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
7773 chsize = 1;
7774 } else {
7775 if (c == dq || c == esc || !isPRINT(c)) {
7776 chsize = 2;
7777 switch (c) {
7778 case '\\' : /* fallthrough */
7779 case '%' : if (c == esc)
7780 octbuf[1] = esc;
7781 else
7782 chsize = 1;
7783 break;
7784 case '\v' : octbuf[1] = 'v'; break;
7785 case '\t' : octbuf[1] = 't'; break;
7786 case '\r' : octbuf[1] = 'r'; break;
7787 case '\n' : octbuf[1] = 'n'; break;
7788 case '\f' : octbuf[1] = 'f'; break;
7789 case '"' : if (dq == '"')
7790 octbuf[1] = '"';
7791 else
7792 chsize = 1;
7793 break;
7794 default: chsize = my_snprintf(octbuf, sizeof octbuf,
7795 pv < end && isDIGIT((U8)*(pv+readsize))
7796 ? "%c%03o" : "%c%o", esc, c);
7797 }
7798 } else {
7799 chsize = 1;
7800 }
7801 }
7802 if (max && wrote + chsize > max) {
7803 break;
7804 } else if (chsize > 1) {
7805 sv_catpvn(dsv, octbuf, chsize);
7806 wrote += chsize;
7807 } else {
7808 char tmp[2];
7809 my_snprintf(tmp, sizeof tmp, "%c", c);
7810 sv_catpvn(dsv, tmp, 1);
7811 wrote++;
7812 }
7813 if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
7814 break;
7815 }
7816 if (escaped != NULL)
7817 *escaped= pv - str;
7818 return SvPVX(dsv);
7819}
7820
7821#endif
7822#endif
7823
7824#ifndef pv_pretty
7825#if defined(NEED_pv_pretty)
7826static 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);
7827static
7828#else
7829extern 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);
7830#endif
7831
7832#ifdef pv_pretty
7833# undef pv_pretty
7834#endif
7835#define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
7836#define Perl_pv_pretty DPPP_(my_pv_pretty)
7837
7838#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
7839
7840char *
7841DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
7842 const STRLEN max, char const * const start_color, char const * const end_color,
7843 const U32 flags)
7844{
7845 const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
7846 STRLEN escaped;
7847
7848 if (!(flags & PERL_PV_PRETTY_NOCLEAR))
7849 sv_setpvs(dsv, "");
7850
7851 if (dq == '"')
7852 sv_catpvs(dsv, "\"");
7853 else if (flags & PERL_PV_PRETTY_LTGT)
7854 sv_catpvs(dsv, "<");
7855
7856 if (start_color != NULL)
7857 sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
7858
7859 pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
7860
7861 if (end_color != NULL)
7862 sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
7863
7864 if (dq == '"')
7865 sv_catpvs(dsv, "\"");
7866 else if (flags & PERL_PV_PRETTY_LTGT)
7867 sv_catpvs(dsv, ">");
7868
7869 if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
7870 sv_catpvs(dsv, "...");
7871
7872 return SvPVX(dsv);
7873}
7874
7875#endif
7876#endif
7877
7878#ifndef pv_display
7879#if defined(NEED_pv_display)
7880static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7881static
7882#else
7883extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
7884#endif
7885
7886#ifdef pv_display
7887# undef pv_display
7888#endif
7889#define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
7890#define Perl_pv_display DPPP_(my_pv_display)
7891
7892#if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
7893
7894char *
7895DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
7896{
7897 pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
7898 if (len > cur && pv[cur] == '\0')
7899 sv_catpvs(dsv, "\\0");
7900 return SvPVX(dsv);
7901}
7902
7903#endif
7904#endif
7905
7906#endif /* _P_P_PORTABILITY_H_ */
7907
7908/* End of File ppport.h */
This page took 0.408714 seconds and 4 git commands to generate.