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