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