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