This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #76814] FETCH called twice - string comparison ops
[perl5.git] / mathoms.c
CommitLineData
7ee2227d
SP
1/* mathoms.c
2 *
1129b882 3 * Copyright (C) 2005, 2006, 2007, 2008 by Larry Wall and others
7ee2227d
SP
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
10/*
4ac71550
TC
11 * Anything that Hobbits had no immediate use for, but were unwilling to
12 * throw away, they called a mathom. Their dwellings were apt to become
13 * rather crowded with mathoms, and many of the presents that passed from
14 * hand to hand were of that sort.
15 *
16 * [p.5 of _The Lord of the Rings_: "Prologue"]
7ee2227d
SP
17 */
18
359d40ba 19
20fac488 20
7ee2227d
SP
21/*
22 * This file contains mathoms, various binary artifacts from previous
f2f0f092
NC
23 * versions of Perl. For binary or source compatibility reasons, though,
24 * we cannot completely remove them from the core code.
7ee2227d
SP
25 *
26 * SMP - Oct. 24, 2005
27 *
28 */
29
30#include "EXTERN.h"
31#define PERL_IN_MATHOMS_C
32#include "perl.h"
33
359d40ba
NC
34#ifdef NO_MATHOMS
35/* ..." warning: ISO C forbids an empty source file"
36 So make sure we have something in here by processing the headers anyway.
37 */
38#else
39
a0c21aa1
JH
40PERL_CALLCONV OP * Perl_ref(pTHX_ OP *o, I32 type);
41PERL_CALLCONV void Perl_sv_unref(pTHX_ SV *sv);
42PERL_CALLCONV void Perl_sv_taint(pTHX_ SV *sv);
43PERL_CALLCONV IV Perl_sv_2iv(pTHX_ register SV *sv);
44PERL_CALLCONV UV Perl_sv_2uv(pTHX_ register SV *sv);
39d5de13 45PERL_CALLCONV NV Perl_sv_2nv(pTHX_ register SV *sv);
a0c21aa1
JH
46PERL_CALLCONV char * Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp);
47PERL_CALLCONV char * Perl_sv_2pv_nolen(pTHX_ register SV *sv);
48PERL_CALLCONV char * Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv);
49PERL_CALLCONV char * Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv);
50PERL_CALLCONV void Perl_sv_force_normal(pTHX_ register SV *sv);
51PERL_CALLCONV void Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr);
52PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen);
53PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len);
54PERL_CALLCONV void Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr);
55PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv);
56PERL_CALLCONV char * Perl_sv_pv(pTHX_ SV *sv);
57PERL_CALLCONV char * Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp);
58PERL_CALLCONV char * Perl_sv_pvbyte(pTHX_ SV *sv);
59PERL_CALLCONV char * Perl_sv_pvutf8(pTHX_ SV *sv);
60PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade(pTHX_ register SV *sv);
61PERL_CALLCONV NV Perl_huge(void);
62PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix);
63PERL_CALLCONV void Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix);
64PERL_CALLCONV GV * Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name);
65PERL_CALLCONV HE * Perl_hv_iternext(pTHX_ HV *hv);
66PERL_CALLCONV void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how);
67PERL_CALLCONV bool Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp);
68PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp);
69PERL_CALLCONV bool Perl_do_exec(pTHX_ const char *cmd);
70PERL_CALLCONV U8 * Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
71PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep);
72PERL_CALLCONV void Perl_sv_nolocking(pTHX_ SV *sv);
73PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len);
74PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len);
75PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...);
76PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...);
56d7a086 77PERL_CALLCONV int Perl_magic_setglob(pTHX_ SV* sv, MAGIC* mg);
ac572bf4 78PERL_CALLCONV AV * Perl_newAV(pTHX);
78ac7dd9 79PERL_CALLCONV HV * Perl_newHV(pTHX);
85dca89a 80PERL_CALLCONV IO * Perl_newIO(pTHX);
0d7d409d
DM
81PERL_CALLCONV I32 Perl_my_stat(pTHX);
82PERL_CALLCONV I32 Perl_my_lstat(pTHX);
078504b2
FC
83PERL_CALLCONV I32 Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2);
84PERL_CALLCONV char * Perl_sv_collxfrm(pTHX_ SV *const sv, STRLEN *const nxp);
b5445a23 85
7ee2227d
SP
86/* ref() is now a macro using Perl_doref;
87 * this version provided for binary compatibility only.
88 */
89OP *
90Perl_ref(pTHX_ OP *o, I32 type)
91{
92 return doref(o, type, TRUE);
93}
94
aae9cea0 95/*
174c73e3
NC
96=for apidoc sv_unref
97
98Unsets the RV status of the SV, and decrements the reference count of
99whatever was being referenced by the RV. This can almost be thought of
100as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag>
101being zero. See C<SvROK_off>.
102
103=cut
104*/
105
106void
107Perl_sv_unref(pTHX_ SV *sv)
108{
7918f24d
NC
109 PERL_ARGS_ASSERT_SV_UNREF;
110
174c73e3
NC
111 sv_unref_flags(sv, 0);
112}
113
114/*
aae9cea0
NC
115=for apidoc sv_taint
116
117Taint an SV. Use C<SvTAINTED_on> instead.
118=cut
119*/
120
121void
122Perl_sv_taint(pTHX_ SV *sv)
123{
7918f24d
NC
124 PERL_ARGS_ASSERT_SV_TAINT;
125
a0714e2c 126 sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0);
aae9cea0
NC
127}
128
7ee2227d
SP
129/* sv_2iv() is now a macro using Perl_sv_2iv_flags();
130 * this function provided for binary compatibility only
131 */
132
133IV
134Perl_sv_2iv(pTHX_ register SV *sv)
135{
136 return sv_2iv_flags(sv, SV_GMAGIC);
137}
138
139/* sv_2uv() is now a macro using Perl_sv_2uv_flags();
140 * this function provided for binary compatibility only
141 */
142
143UV
144Perl_sv_2uv(pTHX_ register SV *sv)
145{
146 return sv_2uv_flags(sv, SV_GMAGIC);
147}
148
39d5de13
DM
149/* sv_2nv() is now a macro using Perl_sv_2nv_flags();
150 * this function provided for binary compatibility only
151 */
152
153NV
154Perl_sv_2nv(pTHX_ register SV *sv)
155{
156 return sv_2nv_flags(sv, SV_GMAGIC);
157}
158
159
7ee2227d
SP
160/* sv_2pv() is now a macro using Perl_sv_2pv_flags();
161 * this function provided for binary compatibility only
162 */
163
164char *
165Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
166{
167 return sv_2pv_flags(sv, lp, SV_GMAGIC);
168}
169
5abc721d 170/*
cb2f1b7b
NC
171=for apidoc sv_2pv_nolen
172
173Like C<sv_2pv()>, but doesn't return the length too. You should usually
174use the macro wrapper C<SvPV_nolen(sv)> instead.
175=cut
176*/
177
178char *
179Perl_sv_2pv_nolen(pTHX_ register SV *sv)
180{
c85ae797 181 PERL_ARGS_ASSERT_SV_2PV_NOLEN;
b5445a23 182 return sv_2pv(sv, NULL);
cb2f1b7b
NC
183}
184
185/*
186=for apidoc sv_2pvbyte_nolen
187
188Return a pointer to the byte-encoded representation of the SV.
189May cause the SV to be downgraded from UTF-8 as a side-effect.
190
191Usually accessed via the C<SvPVbyte_nolen> macro.
192
193=cut
194*/
195
196char *
197Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv)
198{
7918f24d
NC
199 PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN;
200
b5445a23 201 return sv_2pvbyte(sv, NULL);
cb2f1b7b
NC
202}
203
204/*
205=for apidoc sv_2pvutf8_nolen
206
207Return a pointer to the UTF-8-encoded representation of the SV.
208May cause the SV to be upgraded to UTF-8 as a side-effect.
209
210Usually accessed via the C<SvPVutf8_nolen> macro.
211
212=cut
213*/
214
215char *
216Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv)
217{
7918f24d
NC
218 PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN;
219
b5445a23 220 return sv_2pvutf8(sv, NULL);
cb2f1b7b
NC
221}
222
223/*
5abc721d
NC
224=for apidoc sv_force_normal
225
226Undo various types of fakery on an SV: if the PV is a shared string, make
227a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
228an xpvmg. See also C<sv_force_normal_flags>.
229
230=cut
231*/
232
233void
234Perl_sv_force_normal(pTHX_ register SV *sv)
235{
7918f24d
NC
236 PERL_ARGS_ASSERT_SV_FORCE_NORMAL;
237
5abc721d
NC
238 sv_force_normal_flags(sv, 0);
239}
7ee2227d
SP
240
241/* sv_setsv() is now a macro using Perl_sv_setsv_flags();
242 * this function provided for binary compatibility only
243 */
244
245void
246Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
247{
7918f24d
NC
248 PERL_ARGS_ASSERT_SV_SETSV;
249
7ee2227d
SP
250 sv_setsv_flags(dstr, sstr, SV_GMAGIC);
251}
252
253/* sv_catpvn() is now a macro using Perl_sv_catpvn_flags();
254 * this function provided for binary compatibility only
255 */
256
257void
258Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen)
259{
7918f24d
NC
260 PERL_ARGS_ASSERT_SV_CATPVN;
261
7ee2227d
SP
262 sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC);
263}
264
b347df82
NC
265/*
266=for apidoc sv_catpvn_mg
267
268Like C<sv_catpvn>, but also handles 'set' magic.
269
270=cut
271*/
272
273void
274Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len)
275{
7918f24d
NC
276 PERL_ARGS_ASSERT_SV_CATPVN_MG;
277
b347df82
NC
278 sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC);
279}
280
7ee2227d
SP
281/* sv_catsv() is now a macro using Perl_sv_catsv_flags();
282 * this function provided for binary compatibility only
283 */
284
285void
286Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr)
287{
7918f24d
NC
288 PERL_ARGS_ASSERT_SV_CATSV;
289
7ee2227d
SP
290 sv_catsv_flags(dstr, sstr, SV_GMAGIC);
291}
292
0feed65a 293/*
b347df82
NC
294=for apidoc sv_catsv_mg
295
296Like C<sv_catsv>, but also handles 'set' magic.
297
298=cut
299*/
300
301void
302Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv)
303{
7918f24d
NC
304 PERL_ARGS_ASSERT_SV_CATSV_MG;
305
b347df82
NC
306 sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC);
307}
308
309/*
0feed65a
NC
310=for apidoc sv_iv
311
312A private implementation of the C<SvIVx> macro for compilers which can't
313cope with complex macro expressions. Always use the macro instead.
314
315=cut
316*/
317
318IV
319Perl_sv_iv(pTHX_ register SV *sv)
320{
7918f24d
NC
321 PERL_ARGS_ASSERT_SV_IV;
322
0feed65a
NC
323 if (SvIOK(sv)) {
324 if (SvIsUV(sv))
325 return (IV)SvUVX(sv);
326 return SvIVX(sv);
327 }
328 return sv_2iv(sv);
329}
330
331/*
332=for apidoc sv_uv
333
334A private implementation of the C<SvUVx> macro for compilers which can't
335cope with complex macro expressions. Always use the macro instead.
336
337=cut
338*/
339
340UV
341Perl_sv_uv(pTHX_ register SV *sv)
342{
7918f24d
NC
343 PERL_ARGS_ASSERT_SV_UV;
344
0feed65a
NC
345 if (SvIOK(sv)) {
346 if (SvIsUV(sv))
347 return SvUVX(sv);
348 return (UV)SvIVX(sv);
349 }
350 return sv_2uv(sv);
351}
352
353/*
354=for apidoc sv_nv
355
356A private implementation of the C<SvNVx> macro for compilers which can't
357cope with complex macro expressions. Always use the macro instead.
358
359=cut
360*/
361
362NV
363Perl_sv_nv(pTHX_ register SV *sv)
364{
7918f24d
NC
365 PERL_ARGS_ASSERT_SV_NV;
366
0feed65a
NC
367 if (SvNOK(sv))
368 return SvNVX(sv);
369 return sv_2nv(sv);
370}
371
372/*
373=for apidoc sv_pv
374
375Use the C<SvPV_nolen> macro instead
376
377=for apidoc sv_pvn
378
379A private implementation of the C<SvPV> macro for compilers which can't
380cope with complex macro expressions. Always use the macro instead.
381
382=cut
383*/
384
385char *
386Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp)
387{
7918f24d
NC
388 PERL_ARGS_ASSERT_SV_PVN;
389
0feed65a
NC
390 if (SvPOK(sv)) {
391 *lp = SvCUR(sv);
392 return SvPVX(sv);
393 }
394 return sv_2pv(sv, lp);
395}
396
397
398char *
399Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp)
400{
7918f24d
NC
401 PERL_ARGS_ASSERT_SV_PVN_NOMG;
402
0feed65a
NC
403 if (SvPOK(sv)) {
404 *lp = SvCUR(sv);
405 return SvPVX(sv);
406 }
407 return sv_2pv_flags(sv, lp, 0);
408}
409
7ee2227d
SP
410/* sv_pv() is now a macro using SvPV_nolen();
411 * this function provided for binary compatibility only
412 */
413
414char *
415Perl_sv_pv(pTHX_ SV *sv)
416{
7918f24d
NC
417 PERL_ARGS_ASSERT_SV_PV;
418
7ee2227d
SP
419 if (SvPOK(sv))
420 return SvPVX(sv);
421
b5445a23 422 return sv_2pv(sv, NULL);
7ee2227d
SP
423}
424
425/* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags();
426 * this function provided for binary compatibility only
427 */
428
429char *
430Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp)
431{
7918f24d
NC
432 PERL_ARGS_ASSERT_SV_PVN_FORCE;
433
7ee2227d
SP
434 return sv_pvn_force_flags(sv, lp, SV_GMAGIC);
435}
436
437/* sv_pvbyte () is now a macro using Perl_sv_2pv_flags();
438 * this function provided for binary compatibility only
439 */
440
441char *
442Perl_sv_pvbyte(pTHX_ SV *sv)
443{
7918f24d
NC
444 PERL_ARGS_ASSERT_SV_PVBYTE;
445
b5445a23 446 sv_utf8_downgrade(sv, FALSE);
7ee2227d
SP
447 return sv_pv(sv);
448}
449
0feed65a
NC
450/*
451=for apidoc sv_pvbyte
452
453Use C<SvPVbyte_nolen> instead.
454
455=for apidoc sv_pvbyten
456
457A private implementation of the C<SvPVbyte> macro for compilers
458which can't cope with complex macro expressions. Always use the macro
459instead.
460
461=cut
462*/
463
464char *
465Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp)
466{
7918f24d
NC
467 PERL_ARGS_ASSERT_SV_PVBYTEN;
468
b5445a23 469 sv_utf8_downgrade(sv, FALSE);
0feed65a
NC
470 return sv_pvn(sv,lp);
471}
472
7ee2227d
SP
473/* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags();
474 * this function provided for binary compatibility only
475 */
476
477char *
478Perl_sv_pvutf8(pTHX_ SV *sv)
479{
7918f24d
NC
480 PERL_ARGS_ASSERT_SV_PVUTF8;
481
7ee2227d
SP
482 sv_utf8_upgrade(sv);
483 return sv_pv(sv);
484}
485
0feed65a
NC
486/*
487=for apidoc sv_pvutf8
488
489Use the C<SvPVutf8_nolen> macro instead
490
491=for apidoc sv_pvutf8n
492
493A private implementation of the C<SvPVutf8> macro for compilers
494which can't cope with complex macro expressions. Always use the macro
495instead.
496
497=cut
498*/
499
500char *
501Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp)
502{
7918f24d
NC
503 PERL_ARGS_ASSERT_SV_PVUTF8N;
504
0feed65a
NC
505 sv_utf8_upgrade(sv);
506 return sv_pvn(sv,lp);
507}
508
205c02c2
NC
509/* sv_utf8_upgrade() is now a macro using sv_utf8_upgrade_flags();
510 * this function provided for binary compatibility only
511 */
512
513STRLEN
514Perl_sv_utf8_upgrade(pTHX_ register SV *sv)
515{
7918f24d
NC
516 PERL_ARGS_ASSERT_SV_UTF8_UPGRADE;
517
205c02c2
NC
518 return sv_utf8_upgrade_flags(sv, SV_GMAGIC);
519}
520
7ee2227d
SP
521int
522Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
523{
524 dTHXs;
525 va_list(arglist);
7918f24d
NC
526
527 /* Easier to special case this here than in embed.pl. (Look at what it
528 generates for proto.h) */
529#ifdef PERL_IMPLICIT_CONTEXT
530 PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT;
531#endif
532
7ee2227d
SP
533 va_start(arglist, format);
534 return PerlIO_vprintf(stream, format, arglist);
535}
536
537int
538Perl_printf_nocontext(const char *format, ...)
539{
540 dTHX;
541 va_list(arglist);
7918f24d
NC
542
543#ifdef PERL_IMPLICIT_CONTEXT
544 PERL_ARGS_ASSERT_PRINTF_NOCONTEXT;
545#endif
546
7ee2227d
SP
547 va_start(arglist, format);
548 return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
549}
550
551#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))
552/*
553 * This hack is to force load of "huge" support from libm.a
554 * So it is in perl for (say) POSIX to use.
555 * Needed for SunOS with Sun's 'acc' for example.
556 */
557NV
558Perl_huge(void)
559{
c773ee7a 560# if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
7ee2227d 561 return HUGE_VALL;
c773ee7a 562# else
7ee2227d 563 return HUGE_VAL;
c773ee7a 564# endif
7ee2227d
SP
565}
566#endif
567
f2f0f092
NC
568/* compatibility with versions <= 5.003. */
569void
570Perl_gv_fullname(pTHX_ SV *sv, const GV *gv)
571{
7918f24d
NC
572 PERL_ARGS_ASSERT_GV_FULLNAME;
573
666ea192 574 gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : "");
f2f0f092
NC
575}
576
577/* compatibility with versions <= 5.003. */
578void
579Perl_gv_efullname(pTHX_ SV *sv, const GV *gv)
580{
7918f24d
NC
581 PERL_ARGS_ASSERT_GV_EFULLNAME;
582
666ea192 583 gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : "");
f2f0f092
NC
584}
585
2674aeec
NC
586void
587Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
588{
7918f24d
NC
589 PERL_ARGS_ASSERT_GV_FULLNAME3;
590
2674aeec
NC
591 gv_fullname4(sv, gv, prefix, TRUE);
592}
593
594void
595Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
596{
7918f24d
NC
597 PERL_ARGS_ASSERT_GV_EFULLNAME3;
598
2674aeec
NC
599 gv_efullname4(sv, gv, prefix, TRUE);
600}
601
887986eb
NC
602/*
603=for apidoc gv_fetchmethod
604
605See L<gv_fetchmethod_autoload>.
606
607=cut
608*/
609
610GV *
611Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name)
612{
7918f24d
NC
613 PERL_ARGS_ASSERT_GV_FETCHMETHOD;
614
887986eb
NC
615 return gv_fetchmethod_autoload(stash, name, TRUE);
616}
617
7a7b9979
NC
618HE *
619Perl_hv_iternext(pTHX_ HV *hv)
620{
7918f24d
NC
621 PERL_ARGS_ASSERT_HV_ITERNEXT;
622
7a7b9979
NC
623 return hv_iternext_flags(hv, 0);
624}
625
bc5cdc23
NC
626void
627Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
628{
7918f24d
NC
629 PERL_ARGS_ASSERT_HV_MAGIC;
630
ad64d0ec 631 sv_magic(MUTABLE_SV(hv), MUTABLE_SV(gv), how, NULL, 0);
bc5cdc23
NC
632}
633
34d367cd 634bool
e4dba786
NC
635Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw,
636 int rawmode, int rawperm, PerlIO *supplied_fp)
637{
7918f24d
NC
638 PERL_ARGS_ASSERT_DO_OPEN;
639
e4dba786
NC
640 return do_openn(gv, name, len, as_raw, rawmode, rawperm,
641 supplied_fp, (SV **) NULL, 0);
642}
643
644bool
34d367cd
SP
645Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int
646as_raw,
647 int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs,
648 I32 num_svs)
649{
7918f24d
NC
650 PERL_ARGS_ASSERT_DO_OPEN9;
651
34d367cd
SP
652 PERL_UNUSED_ARG(num_svs);
653 return do_openn(gv, name, len, as_raw, rawmode, rawperm,
654 supplied_fp, &svs, 1);
655}
656
657int
658Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode)
659{
660 /* The old body of this is now in non-LAYER part of perlio.c
661 * This is a stub for any XS code which might have been calling it.
662 */
663 const char *name = ":raw";
7918f24d
NC
664
665 PERL_ARGS_ASSERT_DO_BINMODE;
666
34d367cd
SP
667#ifdef PERLIO_USING_CRLF
668 if (!(mode & O_BINARY))
669 name = ":crlf";
670#endif
671 return PerlIO_binmode(aTHX_ fp, iotype, mode, name);
672}
673
a9f96b3f
NC
674#ifndef OS2
675bool
676Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp)
677{
7918f24d
NC
678 PERL_ARGS_ASSERT_DO_AEXEC;
679
a9f96b3f
NC
680 return do_aexec5(really, mark, sp, 0, 0);
681}
682#endif
683
9555a685
NC
684#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
685bool
686Perl_do_exec(pTHX_ const char *cmd)
687{
7918f24d
NC
688 PERL_ARGS_ASSERT_DO_EXEC;
689
9555a685
NC
690 return do_exec3(cmd,0,0);
691}
692#endif
693
89552e80
NC
694/* Backwards compatibility. */
695int
696Perl_init_i18nl14n(pTHX_ int printwarn)
697{
698 return init_i18nl10n(printwarn);
699}
700
c78ff979
NC
701PP(pp_padany)
702{
703 DIE(aTHX_ "NOT IMPL LINE %d",__LINE__);
c78ff979
NC
704}
705
706PP(pp_mapstart)
707{
708 DIE(aTHX_ "panic: mapstart"); /* uses grepstart */
709}
710
0b612f93
NC
711/* These ops all have the same body as pp_null. */
712PP(pp_scalar)
713{
97aff369 714 dVAR;
0b612f93
NC
715 return NORMAL;
716}
717
718PP(pp_regcmaybe)
719{
97aff369 720 dVAR;
0b612f93
NC
721 return NORMAL;
722}
723
724PP(pp_lineseq)
725{
97aff369 726 dVAR;
0b612f93
NC
727 return NORMAL;
728}
729
730PP(pp_scope)
731{
97aff369 732 dVAR;
0b612f93
NC
733 return NORMAL;
734}
735
736/* Ops that are calls to do_kv. */
737PP(pp_values)
738{
739 return do_kv();
740}
741
742PP(pp_keys)
743{
744 return do_kv();
745}
746
747/* Ops that are simply calls to other ops. */
748PP(pp_dump)
749{
750 return pp_goto();
751 /*NOTREACHED*/
752}
753
754PP(pp_dofile)
755{
756 return pp_require();
757}
758
759PP(pp_dbmclose)
760{
761 return pp_untie();
762}
763
764PP(pp_read)
765{
766 return pp_sysread();
767}
768
769PP(pp_recv)
770{
771 return pp_sysread();
772}
773
774PP(pp_seek)
775{
776 return pp_sysseek();
777}
778
779PP(pp_fcntl)
780{
781 return pp_ioctl();
782}
783
784PP(pp_gsockopt)
785{
786 return pp_ssockopt();
787}
788
789PP(pp_getsockname)
790{
791 return pp_getpeername();
792}
793
794PP(pp_lstat)
795{
796 return pp_stat();
797}
798
799PP(pp_fteowned)
800{
801 return pp_ftrowned();
802}
803
804PP(pp_ftbinary)
805{
806 return pp_fttext();
807}
808
809PP(pp_localtime)
810{
811 return pp_gmtime();
812}
813
814PP(pp_shmget)
815{
816 return pp_semget();
817}
818
819PP(pp_shmctl)
820{
821 return pp_semctl();
822}
823
824PP(pp_shmread)
825{
826 return pp_shmwrite();
827}
828
829PP(pp_msgget)
830{
831 return pp_semget();
832}
833
834PP(pp_msgctl)
835{
836 return pp_semctl();
837}
838
839PP(pp_ghbyname)
840{
841 return pp_ghostent();
842}
843
844PP(pp_ghbyaddr)
845{
846 return pp_ghostent();
847}
848
849PP(pp_gnbyname)
850{
851 return pp_gnetent();
852}
853
854PP(pp_gnbyaddr)
855{
856 return pp_gnetent();
857}
858
859PP(pp_gpbyname)
860{
861 return pp_gprotoent();
862}
863
864PP(pp_gpbynumber)
865{
866 return pp_gprotoent();
867}
868
869PP(pp_gsbyname)
870{
871 return pp_gservent();
872}
873
874PP(pp_gsbyport)
875{
876 return pp_gservent();
877}
878
879PP(pp_gpwnam)
880{
881 return pp_gpwent();
882}
883
884PP(pp_gpwuid)
885{
886 return pp_gpwent();
887}
888
889PP(pp_ggrnam)
890{
891 return pp_ggrent();
892}
893
894PP(pp_ggrgid)
895{
896 return pp_ggrent();
897}
898
957b0e1d
NC
899PP(pp_ftsize)
900{
4992681b 901 return pp_ftis();
957b0e1d
NC
902}
903
904PP(pp_ftmtime)
905{
4992681b 906 return pp_ftis();
957b0e1d
NC
907}
908
909PP(pp_ftatime)
910{
4992681b 911 return pp_ftis();
957b0e1d
NC
912}
913
914PP(pp_ftctime)
915{
4992681b 916 return pp_ftis();
957b0e1d
NC
917}
918
f1cb2d48
NC
919PP(pp_ftzero)
920{
921 return pp_ftrowned();
922}
923
924PP(pp_ftsock)
925{
926 return pp_ftrowned();
927}
928
929PP(pp_ftchr)
930{
931 return pp_ftrowned();
932}
933
934PP(pp_ftblk)
935{
936 return pp_ftrowned();
937}
938
939PP(pp_ftfile)
940{
941 return pp_ftrowned();
942}
943
944PP(pp_ftdir)
945{
946 return pp_ftrowned();
947}
948
949PP(pp_ftpipe)
950{
951 return pp_ftrowned();
952}
953
17ad201a
NC
954PP(pp_ftsuid)
955{
956 return pp_ftrowned();
957}
958
959PP(pp_ftsgid)
960{
961 return pp_ftrowned();
962}
963
964PP(pp_ftsvtx)
965{
966 return pp_ftrowned();
967}
968
605b9385
NC
969PP(pp_unlink)
970{
971 return pp_chown();
972}
973
974PP(pp_chmod)
975{
976 return pp_chown();
977}
978
979PP(pp_utime)
980{
981 return pp_chown();
982}
983
984PP(pp_kill)
985{
986 return pp_chown();
987}
988
ce6987d0
NC
989PP(pp_symlink)
990{
991 return pp_link();
992}
993
af9e49b4
NC
994PP(pp_ftrwrite)
995{
996 return pp_ftrread();
997}
998
999PP(pp_ftrexec)
1000{
1001 return pp_ftrread();
1002}
1003
1004PP(pp_fteread)
1005{
1006 return pp_ftrread();
1007}
1008
1009PP(pp_ftewrite)
1010{
1011 return pp_ftrread();
1012}
1013
1014PP(pp_fteexec)
1015{
1016 return pp_ftrread();
1017}
1018
c9f7ac20
NC
1019PP(pp_msgsnd)
1020{
1021 return pp_shmwrite();
1022}
1023
1024PP(pp_msgrcv)
1025{
1026 return pp_shmwrite();
1027}
1028
64a1bc8e
NC
1029PP(pp_syswrite)
1030{
1031 return pp_send();
1032}
1033
ca563b4e
NC
1034PP(pp_semop)
1035{
1036 return pp_shmwrite();
1037}
1038
25a55bd7
SP
1039PP(pp_dor)
1040{
f6a64177 1041 return pp_defined();
25a55bd7
SP
1042}
1043
c960fc3b
SP
1044PP(pp_andassign)
1045{
1046 return pp_and();
1047}
1048
1049PP(pp_orassign)
1050{
1051 return pp_or();
1052}
1053
1054PP(pp_dorassign)
1055{
1056 return pp_defined();
1057}
1058
12e9c124
NC
1059PP(pp_lcfirst)
1060{
1061 return pp_ucfirst();
1062}
1063
afd9910b
NC
1064PP(pp_slt)
1065{
1066 return pp_sle();
1067}
1068
1069PP(pp_sgt)
1070{
1071 return pp_sle();
1072}
1073
1074PP(pp_sge)
1075{
1076 return pp_sle();
1077}
1078
2723d216
NC
1079PP(pp_rindex)
1080{
1081 return pp_index();
1082}
1083
daa2adfd
NC
1084PP(pp_hex)
1085{
1086 return pp_oct();
1087}
1088
789b4bc9
NC
1089PP(pp_pop)
1090{
1091 return pp_shift();
1092}
1093
71302fe3
NC
1094PP(pp_cos)
1095{
1096 return pp_sin();
1097}
1098
1099PP(pp_exp)
1100{
1101 return pp_sin();
1102}
1103
1104PP(pp_log)
1105{
1106 return pp_sin();
1107}
1108
1109PP(pp_sqrt)
1110{
1111 return pp_sin();
1112}
1113
3658c1f1
NC
1114PP(pp_bit_xor)
1115{
1116 return pp_bit_or();
1117}
1118
17ab7946
NC
1119PP(pp_rv2hv)
1120{
1121 return Perl_pp_rv2av(aTHX);
1122}
1123
038e8d3c
NC
1124U8 *
1125Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
1126{
7918f24d
NC
1127 PERL_ARGS_ASSERT_UVUNI_TO_UTF8;
1128
038e8d3c
NC
1129 return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0);
1130}
1131
814fafa7
NC
1132bool
1133Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
1134{
7918f24d
NC
1135 PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC;
1136
814fafa7
NC
1137 return is_utf8_string_loclen(s, len, ep, 0);
1138}
1139
7ee2227d 1140/*
d5b2b27b
NC
1141=for apidoc sv_nolocking
1142
1143Dummy routine which "locks" an SV when there is no locking module present.
1144Exists to avoid test for a NULL function pointer and because it could
1145potentially warn under some level of strict-ness.
1146
1147"Superseded" by sv_nosharing().
1148
1149=cut
1150*/
1151
1152void
1153Perl_sv_nolocking(pTHX_ SV *sv)
1154{
96a5add6 1155 PERL_UNUSED_CONTEXT;
d5b2b27b
NC
1156 PERL_UNUSED_ARG(sv);
1157}
1158
1159
1160/*
1161=for apidoc sv_nounlocking
1162
1163Dummy routine which "unlocks" an SV when there is no locking module present.
1164Exists to avoid test for a NULL function pointer and because it could
1165potentially warn under some level of strict-ness.
1166
1167"Superseded" by sv_nosharing().
1168
1169=cut
1170*/
1171
1172void
1173Perl_sv_nounlocking(pTHX_ SV *sv)
1174{
96a5add6 1175 PERL_UNUSED_CONTEXT;
d5b2b27b
NC
1176 PERL_UNUSED_ARG(sv);
1177}
1178
2053acbf
NC
1179void
1180Perl_save_long(pTHX_ long int *longp)
1181{
1182 dVAR;
7918f24d
NC
1183
1184 PERL_ARGS_ASSERT_SAVE_LONG;
1185
2053acbf
NC
1186 SSCHECK(3);
1187 SSPUSHLONG(*longp);
1188 SSPUSHPTR(longp);
c6bf6a65 1189 SSPUSHUV(SAVEt_LONG);
2053acbf
NC
1190}
1191
1192void
2053acbf
NC
1193Perl_save_iv(pTHX_ IV *ivp)
1194{
1195 dVAR;
7918f24d
NC
1196
1197 PERL_ARGS_ASSERT_SAVE_IV;
1198
2053acbf
NC
1199 SSCHECK(3);
1200 SSPUSHIV(*ivp);
1201 SSPUSHPTR(ivp);
c6bf6a65 1202 SSPUSHUV(SAVEt_IV);
2053acbf
NC
1203}
1204
1205void
1206Perl_save_nogv(pTHX_ GV *gv)
1207{
1208 dVAR;
7918f24d
NC
1209
1210 PERL_ARGS_ASSERT_SAVE_NOGV;
1211
2053acbf
NC
1212 SSCHECK(2);
1213 SSPUSHPTR(gv);
c6bf6a65 1214 SSPUSHUV(SAVEt_NSTAB);
2053acbf
NC
1215}
1216
1217void
1218Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
1219{
1220 dVAR;
1221 register I32 i;
1222
7918f24d
NC
1223 PERL_ARGS_ASSERT_SAVE_LIST;
1224
2053acbf
NC
1225 for (i = 1; i <= maxsarg; i++) {
1226 register SV * const sv = newSV(0);
1227 sv_setsv(sv,sarg[i]);
1228 SSCHECK(3);
1229 SSPUSHPTR(sarg[i]); /* remember the pointer */
1230 SSPUSHPTR(sv); /* remember the value */
c6bf6a65 1231 SSPUSHUV(SAVEt_ITEM);
2053acbf
NC
1232 }
1233}
1234
47518d95
NC
1235/*
1236=for apidoc sv_usepvn_mg
1237
1238Like C<sv_usepvn>, but also handles 'set' magic.
1239
1240=cut
1241*/
1242
1243void
1244Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len)
1245{
7918f24d
NC
1246 PERL_ARGS_ASSERT_SV_USEPVN_MG;
1247
47518d95
NC
1248 sv_usepvn_flags(sv,ptr,len, SV_SMAGIC);
1249}
1250
1251/*
1252=for apidoc sv_usepvn
1253
1254Tells an SV to use C<ptr> to find its string value. Implemented by
1255calling C<sv_usepvn_flags> with C<flags> of 0, hence does not handle 'set'
1256magic. See C<sv_usepvn_flags>.
1257
1258=cut
1259*/
1260
1261void
1262Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len)
1263{
7918f24d
NC
1264 PERL_ARGS_ASSERT_SV_USEPVN;
1265
47518d95
NC
1266 sv_usepvn_flags(sv,ptr,len, 0);
1267}
1268
c03e83bf
NC
1269/*
1270=for apidoc unpack_str
1271
1272The engine implementing unpack() Perl function. Note: parameters strbeg, new_s
1273and ocnt are not used. This call should not be used, use unpackstring instead.
1274
1275=cut */
1276
1277I32
1278Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s,
1279 const char *strbeg, const char *strend, char **new_s, I32 ocnt,
1280 U32 flags)
1281{
7918f24d
NC
1282 PERL_ARGS_ASSERT_UNPACK_STR;
1283
c03e83bf
NC
1284 PERL_UNUSED_ARG(strbeg);
1285 PERL_UNUSED_ARG(new_s);
1286 PERL_UNUSED_ARG(ocnt);
1287
1288 return unpackstring(pat, patend, s, strend, flags);
1289}
b47163a2
NC
1290
1291/*
1292=for apidoc pack_cat
1293
1294The engine implementing pack() Perl function. Note: parameters next_in_list and
1295flags are not used. This call should not be used; use packlist instead.
1296
1297=cut
1298*/
1299
1300void
1301Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
1302{
7918f24d
NC
1303 PERL_ARGS_ASSERT_PACK_CAT;
1304
b47163a2
NC
1305 PERL_UNUSED_ARG(next_in_list);
1306 PERL_UNUSED_ARG(flags);
1307
1308 packlist(cat, pat, patend, beglist, endlist);
1309}
4c2df08c
NC
1310
1311HE *
1312Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, U32 hash)
1313{
59af68cc 1314 return (HE *)hv_common(hv, keysv, NULL, 0, 0, HV_FETCH_ISSTORE, val, hash);
4c2df08c
NC
1315}
1316
1317bool
1318Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash)
1319{
7918f24d
NC
1320 PERL_ARGS_ASSERT_HV_EXISTS_ENT;
1321
4c2df08c
NC
1322 return hv_common(hv, keysv, NULL, 0, 0, HV_FETCH_ISEXISTS, 0, hash)
1323 ? TRUE : FALSE;
1324}
1325
1326HE *
1327Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash)
1328{
7918f24d
NC
1329 PERL_ARGS_ASSERT_HV_FETCH_ENT;
1330
59af68cc 1331 return (HE *)hv_common(hv, keysv, NULL, 0, 0,
4c2df08c
NC
1332 (lval ? HV_FETCH_LVALUE : 0), NULL, hash);
1333}
1334
1335SV *
1336Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash)
1337{
7918f24d
NC
1338 PERL_ARGS_ASSERT_HV_DELETE_ENT;
1339
ad64d0ec
NC
1340 return MUTABLE_SV(hv_common(hv, keysv, NULL, 0, 0, flags | HV_DELETE, NULL,
1341 hash));
4c2df08c
NC
1342}
1343
a038e571
NC
1344SV**
1345Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash,
1346 int flags)
1347{
1348 return (SV**) hv_common(hv, NULL, key, klen, flags,
1349 (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), val, hash);
1350}
1351
1352SV**
1353Perl_hv_store(pTHX_ HV *hv, const char *key, I32 klen_i32, SV *val, U32 hash)
1354{
1355 STRLEN klen;
1356 int flags;
1357
1358 if (klen_i32 < 0) {
1359 klen = -klen_i32;
1360 flags = HVhek_UTF8;
1361 } else {
1362 klen = klen_i32;
1363 flags = 0;
1364 }
1365 return (SV **) hv_common(hv, NULL, key, klen, flags,
1366 (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), val, hash);
1367}
1368
1369bool
1370Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen_i32)
1371{
1372 STRLEN klen;
1373 int flags;
1374
7918f24d
NC
1375 PERL_ARGS_ASSERT_HV_EXISTS;
1376
a038e571
NC
1377 if (klen_i32 < 0) {
1378 klen = -klen_i32;
1379 flags = HVhek_UTF8;
1380 } else {
1381 klen = klen_i32;
1382 flags = 0;
1383 }
1384 return hv_common(hv, NULL, key, klen, flags, HV_FETCH_ISEXISTS, 0, 0)
1385 ? TRUE : FALSE;
1386}
1387
1388SV**
1389Perl_hv_fetch(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 lval)
1390{
1391 STRLEN klen;
1392 int flags;
1393
7918f24d
NC
1394 PERL_ARGS_ASSERT_HV_FETCH;
1395
a038e571
NC
1396 if (klen_i32 < 0) {
1397 klen = -klen_i32;
1398 flags = HVhek_UTF8;
1399 } else {
1400 klen = klen_i32;
1401 flags = 0;
1402 }
1403 return (SV **) hv_common(hv, NULL, key, klen, flags,
1404 lval ? (HV_FETCH_JUST_SV | HV_FETCH_LVALUE)
1405 : HV_FETCH_JUST_SV, NULL, 0);
1406}
1407
1408SV *
1409Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 flags)
1410{
1411 STRLEN klen;
1412 int k_flags;
1413
7918f24d
NC
1414 PERL_ARGS_ASSERT_HV_DELETE;
1415
a038e571
NC
1416 if (klen_i32 < 0) {
1417 klen = -klen_i32;
1418 k_flags = HVhek_UTF8;
1419 } else {
1420 klen = klen_i32;
1421 k_flags = 0;
1422 }
ad64d0ec
NC
1423 return MUTABLE_SV(hv_common(hv, NULL, key, klen, k_flags, flags | HV_DELETE,
1424 NULL, 0));
a038e571
NC
1425}
1426
56d7a086 1427/* Functions after here were made mathoms post 5.10.0 but pre 5.8.9 */
56d7a086 1428
ac572bf4
NC
1429AV *
1430Perl_newAV(pTHX)
1431{
502c6561 1432 return MUTABLE_AV(newSV_type(SVt_PVAV));
ac572bf4
NC
1433 /* sv_upgrade does AvREAL_only():
1434 AvALLOC(av) = 0;
1435 AvARRAY(av) = NULL;
1436 AvMAX(av) = AvFILLp(av) = -1; */
1437}
1438
78ac7dd9
NC
1439HV *
1440Perl_newHV(pTHX)
1441{
85fbaab2 1442 HV * const hv = MUTABLE_HV(newSV_type(SVt_PVHV));
78ac7dd9
NC
1443 assert(!SvOK(hv));
1444
1445 return hv;
1446}
1447
84335ee9
NC
1448void
1449Perl_sv_insert(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len,
1450 const char *const little, const STRLEN littlelen)
1451{
1452 PERL_ARGS_ASSERT_SV_INSERT;
1453 sv_insert_flags(bigstr, offset, len, little, littlelen, SV_GMAGIC);
1454}
1455
2fd8beea
NC
1456void
1457Perl_save_freesv(pTHX_ SV *sv)
1458{
1459 dVAR;
1460 save_freesv(sv);
1461}
1462
1463void
1464Perl_save_mortalizesv(pTHX_ SV *sv)
1465{
1466 dVAR;
1467
1468 PERL_ARGS_ASSERT_SAVE_MORTALIZESV;
1469
1470 save_mortalizesv(sv);
1471}
1472
1473void
1474Perl_save_freeop(pTHX_ OP *o)
1475{
1476 dVAR;
1477 save_freeop(o);
1478}
1479
1480void
1481Perl_save_freepv(pTHX_ char *pv)
1482{
1483 dVAR;
1484 save_freepv(pv);
1485}
1486
1487void
1488Perl_save_op(pTHX)
1489{
1490 dVAR;
1491 save_op();
1492}
1493
d5713896
NC
1494#ifdef PERL_DONT_CREATE_GVSV
1495GV *
1496Perl_gv_SVadd(pTHX_ GV *gv)
1497{
d5713896
NC
1498 return gv_SVadd(gv);
1499}
1500#endif
1501
1502GV *
1503Perl_gv_AVadd(pTHX_ GV *gv)
1504{
d5713896
NC
1505 return gv_AVadd(gv);
1506}
1507
1508GV *
1509Perl_gv_HVadd(pTHX_ register GV *gv)
1510{
d5713896
NC
1511 return gv_HVadd(gv);
1512}
1513
bb85b28a
NC
1514GV *
1515Perl_gv_IOadd(pTHX_ register GV *gv)
1516{
1517 return gv_IOadd(gv);
1518}
1519
85dca89a
NC
1520IO *
1521Perl_newIO(pTHX)
1522{
1523 return MUTABLE_IO(newSV_type(SVt_PVIO));
1524}
1525
0d7d409d
DM
1526I32
1527Perl_my_stat(pTHX)
1528{
1529 return my_stat_flags(SV_GMAGIC);
1530}
1531
1532I32
1533Perl_my_lstat(pTHX)
1534{
1535 return my_lstat_flags(SV_GMAGIC);
1536}
1537
078504b2
FC
1538I32
1539Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2)
1540{
1541 return sv_eq_flags(sv1, sv2, SV_GMAGIC);
1542}
1543
1544char *
1545Perl_sv_collxfrm(pTHX_ SV *const sv, STRLEN *const nxp)
1546{
1547 return sv_collxfrm_flags(sv, nxp, SV_GMAGIC);
1548}
1549
20fac488
GA
1550#endif /* NO_MATHOMS */
1551
d5b2b27b 1552/*
7ee2227d
SP
1553 * Local variables:
1554 * c-indentation-style: bsd
1555 * c-basic-offset: 4
1556 * indent-tabs-mode: t
1557 * End:
1558 *
1559 * ex: set ts=8 sts=4 sw=4 noet:
1560 */