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