3 * Copyright (C) 2005, 2006, 2007, 2008 by Larry Wall and others
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.
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.
16 * [p.5 of _The Lord of the Rings_: "Prologue"]
22 * This file contains mathoms, various binary artifacts from previous
23 * versions of Perl. For binary or source compatibility reasons, though,
24 * we cannot completely remove them from the core code.
31 #define PERL_IN_MATHOMS_C
35 /* ..." warning: ISO C forbids an empty source file"
36 So make sure we have something in here by processing the headers anyway.
40 PERL_CALLCONV OP * Perl_ref(pTHX_ OP *o, I32 type);
41 PERL_CALLCONV void Perl_sv_unref(pTHX_ SV *sv);
42 PERL_CALLCONV void Perl_sv_taint(pTHX_ SV *sv);
43 PERL_CALLCONV IV Perl_sv_2iv(pTHX_ register SV *sv);
44 PERL_CALLCONV UV Perl_sv_2uv(pTHX_ register SV *sv);
45 PERL_CALLCONV NV Perl_sv_2nv(pTHX_ register SV *sv);
46 PERL_CALLCONV char * Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp);
47 PERL_CALLCONV char * Perl_sv_2pv_nolen(pTHX_ register SV *sv);
48 PERL_CALLCONV char * Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv);
49 PERL_CALLCONV char * Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv);
50 PERL_CALLCONV void Perl_sv_force_normal(pTHX_ register SV *sv);
51 PERL_CALLCONV void Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr);
52 PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen);
53 PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len);
54 PERL_CALLCONV void Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr);
55 PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv);
56 PERL_CALLCONV char * Perl_sv_pv(pTHX_ SV *sv);
57 PERL_CALLCONV char * Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp);
58 PERL_CALLCONV char * Perl_sv_pvbyte(pTHX_ SV *sv);
59 PERL_CALLCONV char * Perl_sv_pvutf8(pTHX_ SV *sv);
60 PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade(pTHX_ register SV *sv);
61 PERL_CALLCONV NV Perl_huge(void);
62 PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix);
63 PERL_CALLCONV void Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix);
64 PERL_CALLCONV GV * Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name);
65 PERL_CALLCONV HE * Perl_hv_iternext(pTHX_ HV *hv);
66 PERL_CALLCONV void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how);
67 PERL_CALLCONV bool Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp);
68 PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp);
69 PERL_CALLCONV bool Perl_do_exec(pTHX_ const char *cmd);
70 PERL_CALLCONV U8 * Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
71 PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep);
72 PERL_CALLCONV void Perl_sv_nolocking(pTHX_ SV *sv);
73 PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len);
74 PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len);
75 PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...);
76 PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...);
77 PERL_CALLCONV int Perl_magic_setglob(pTHX_ SV* sv, MAGIC* mg);
78 PERL_CALLCONV AV * Perl_newAV(pTHX);
79 PERL_CALLCONV HV * Perl_newHV(pTHX);
80 PERL_CALLCONV IO * Perl_newIO(pTHX);
82 /* ref() is now a macro using Perl_doref;
83 * this version provided for binary compatibility only.
86 Perl_ref(pTHX_ OP *o, I32 type)
88 return doref(o, type, TRUE);
94 Unsets the RV status of the SV, and decrements the reference count of
95 whatever was being referenced by the RV. This can almost be thought of
96 as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag>
97 being zero. See C<SvROK_off>.
103 Perl_sv_unref(pTHX_ SV *sv)
105 PERL_ARGS_ASSERT_SV_UNREF;
107 sv_unref_flags(sv, 0);
113 Taint an SV. Use C<SvTAINTED_on> instead.
118 Perl_sv_taint(pTHX_ SV *sv)
120 PERL_ARGS_ASSERT_SV_TAINT;
122 sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0);
125 /* sv_2iv() is now a macro using Perl_sv_2iv_flags();
126 * this function provided for binary compatibility only
130 Perl_sv_2iv(pTHX_ register SV *sv)
132 return sv_2iv_flags(sv, SV_GMAGIC);
135 /* sv_2uv() is now a macro using Perl_sv_2uv_flags();
136 * this function provided for binary compatibility only
140 Perl_sv_2uv(pTHX_ register SV *sv)
142 return sv_2uv_flags(sv, SV_GMAGIC);
145 /* sv_2nv() is now a macro using Perl_sv_2nv_flags();
146 * this function provided for binary compatibility only
150 Perl_sv_2nv(pTHX_ register SV *sv)
152 return sv_2nv_flags(sv, SV_GMAGIC);
156 /* sv_2pv() is now a macro using Perl_sv_2pv_flags();
157 * this function provided for binary compatibility only
161 Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
163 return sv_2pv_flags(sv, lp, SV_GMAGIC);
167 =for apidoc sv_2pv_nolen
169 Like C<sv_2pv()>, but doesn't return the length too. You should usually
170 use the macro wrapper C<SvPV_nolen(sv)> instead.
175 Perl_sv_2pv_nolen(pTHX_ register SV *sv)
177 return sv_2pv(sv, NULL);
181 =for apidoc sv_2pvbyte_nolen
183 Return a pointer to the byte-encoded representation of the SV.
184 May cause the SV to be downgraded from UTF-8 as a side-effect.
186 Usually accessed via the C<SvPVbyte_nolen> macro.
192 Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv)
194 PERL_ARGS_ASSERT_SV_2PVBYTE_NOLEN;
196 return sv_2pvbyte(sv, NULL);
200 =for apidoc sv_2pvutf8_nolen
202 Return a pointer to the UTF-8-encoded representation of the SV.
203 May cause the SV to be upgraded to UTF-8 as a side-effect.
205 Usually accessed via the C<SvPVutf8_nolen> macro.
211 Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv)
213 PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN;
215 return sv_2pvutf8(sv, NULL);
219 =for apidoc sv_force_normal
221 Undo various types of fakery on an SV: if the PV is a shared string, make
222 a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
223 an xpvmg. See also C<sv_force_normal_flags>.
229 Perl_sv_force_normal(pTHX_ register SV *sv)
231 PERL_ARGS_ASSERT_SV_FORCE_NORMAL;
233 sv_force_normal_flags(sv, 0);
236 /* sv_setsv() is now a macro using Perl_sv_setsv_flags();
237 * this function provided for binary compatibility only
241 Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
243 PERL_ARGS_ASSERT_SV_SETSV;
245 sv_setsv_flags(dstr, sstr, SV_GMAGIC);
248 /* sv_catpvn() is now a macro using Perl_sv_catpvn_flags();
249 * this function provided for binary compatibility only
253 Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen)
255 PERL_ARGS_ASSERT_SV_CATPVN;
257 sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC);
261 =for apidoc sv_catpvn_mg
263 Like C<sv_catpvn>, but also handles 'set' magic.
269 Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len)
271 PERL_ARGS_ASSERT_SV_CATPVN_MG;
273 sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC);
276 /* sv_catsv() is now a macro using Perl_sv_catsv_flags();
277 * this function provided for binary compatibility only
281 Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr)
283 PERL_ARGS_ASSERT_SV_CATSV;
285 sv_catsv_flags(dstr, sstr, SV_GMAGIC);
289 =for apidoc sv_catsv_mg
291 Like C<sv_catsv>, but also handles 'set' magic.
297 Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv)
299 PERL_ARGS_ASSERT_SV_CATSV_MG;
301 sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC);
307 A private implementation of the C<SvIVx> macro for compilers which can't
308 cope with complex macro expressions. Always use the macro instead.
314 Perl_sv_iv(pTHX_ register SV *sv)
316 PERL_ARGS_ASSERT_SV_IV;
320 return (IV)SvUVX(sv);
329 A private implementation of the C<SvUVx> macro for compilers which can't
330 cope with complex macro expressions. Always use the macro instead.
336 Perl_sv_uv(pTHX_ register SV *sv)
338 PERL_ARGS_ASSERT_SV_UV;
343 return (UV)SvIVX(sv);
351 A private implementation of the C<SvNVx> macro for compilers which can't
352 cope with complex macro expressions. Always use the macro instead.
358 Perl_sv_nv(pTHX_ register SV *sv)
360 PERL_ARGS_ASSERT_SV_NV;
370 Use the C<SvPV_nolen> macro instead
374 A private implementation of the C<SvPV> macro for compilers which can't
375 cope with complex macro expressions. Always use the macro instead.
381 Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp)
383 PERL_ARGS_ASSERT_SV_PVN;
389 return sv_2pv(sv, lp);
394 Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp)
396 PERL_ARGS_ASSERT_SV_PVN_NOMG;
402 return sv_2pv_flags(sv, lp, 0);
405 /* sv_pv() is now a macro using SvPV_nolen();
406 * this function provided for binary compatibility only
410 Perl_sv_pv(pTHX_ SV *sv)
412 PERL_ARGS_ASSERT_SV_PV;
417 return sv_2pv(sv, NULL);
420 /* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags();
421 * this function provided for binary compatibility only
425 Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp)
427 PERL_ARGS_ASSERT_SV_PVN_FORCE;
429 return sv_pvn_force_flags(sv, lp, SV_GMAGIC);
432 /* sv_pvbyte () is now a macro using Perl_sv_2pv_flags();
433 * this function provided for binary compatibility only
437 Perl_sv_pvbyte(pTHX_ SV *sv)
439 PERL_ARGS_ASSERT_SV_PVBYTE;
441 sv_utf8_downgrade(sv, FALSE);
446 =for apidoc sv_pvbyte
448 Use C<SvPVbyte_nolen> instead.
450 =for apidoc sv_pvbyten
452 A private implementation of the C<SvPVbyte> macro for compilers
453 which can't cope with complex macro expressions. Always use the macro
460 Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp)
462 PERL_ARGS_ASSERT_SV_PVBYTEN;
464 sv_utf8_downgrade(sv, FALSE);
465 return sv_pvn(sv,lp);
468 /* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags();
469 * this function provided for binary compatibility only
473 Perl_sv_pvutf8(pTHX_ SV *sv)
475 PERL_ARGS_ASSERT_SV_PVUTF8;
482 =for apidoc sv_pvutf8
484 Use the C<SvPVutf8_nolen> macro instead
486 =for apidoc sv_pvutf8n
488 A private implementation of the C<SvPVutf8> macro for compilers
489 which can't cope with complex macro expressions. Always use the macro
496 Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp)
498 PERL_ARGS_ASSERT_SV_PVUTF8N;
501 return sv_pvn(sv,lp);
504 /* sv_utf8_upgrade() is now a macro using sv_utf8_upgrade_flags();
505 * this function provided for binary compatibility only
509 Perl_sv_utf8_upgrade(pTHX_ register SV *sv)
511 PERL_ARGS_ASSERT_SV_UTF8_UPGRADE;
513 return sv_utf8_upgrade_flags(sv, SV_GMAGIC);
517 Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
522 /* Easier to special case this here than in embed.pl. (Look at what it
523 generates for proto.h) */
524 #ifdef PERL_IMPLICIT_CONTEXT
525 PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT;
528 va_start(arglist, format);
529 return PerlIO_vprintf(stream, format, arglist);
533 Perl_printf_nocontext(const char *format, ...)
538 #ifdef PERL_IMPLICIT_CONTEXT
539 PERL_ARGS_ASSERT_PRINTF_NOCONTEXT;
542 va_start(arglist, format);
543 return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
546 #if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))
548 * This hack is to force load of "huge" support from libm.a
549 * So it is in perl for (say) POSIX to use.
550 * Needed for SunOS with Sun's 'acc' for example.
555 # if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
563 /* compatibility with versions <= 5.003. */
565 Perl_gv_fullname(pTHX_ SV *sv, const GV *gv)
567 PERL_ARGS_ASSERT_GV_FULLNAME;
569 gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : "");
572 /* compatibility with versions <= 5.003. */
574 Perl_gv_efullname(pTHX_ SV *sv, const GV *gv)
576 PERL_ARGS_ASSERT_GV_EFULLNAME;
578 gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : "");
582 Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
584 PERL_ARGS_ASSERT_GV_FULLNAME3;
586 gv_fullname4(sv, gv, prefix, TRUE);
590 Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
592 PERL_ARGS_ASSERT_GV_EFULLNAME3;
594 gv_efullname4(sv, gv, prefix, TRUE);
598 =for apidoc gv_fetchmethod
600 See L<gv_fetchmethod_autoload>.
606 Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name)
608 PERL_ARGS_ASSERT_GV_FETCHMETHOD;
610 return gv_fetchmethod_autoload(stash, name, TRUE);
614 Perl_hv_iternext(pTHX_ HV *hv)
616 PERL_ARGS_ASSERT_HV_ITERNEXT;
618 return hv_iternext_flags(hv, 0);
622 Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
624 PERL_ARGS_ASSERT_HV_MAGIC;
626 sv_magic(MUTABLE_SV(hv), MUTABLE_SV(gv), how, NULL, 0);
630 Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw,
631 int rawmode, int rawperm, PerlIO *supplied_fp)
633 PERL_ARGS_ASSERT_DO_OPEN;
635 return do_openn(gv, name, len, as_raw, rawmode, rawperm,
636 supplied_fp, (SV **) NULL, 0);
640 Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int
642 int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs,
645 PERL_ARGS_ASSERT_DO_OPEN9;
647 PERL_UNUSED_ARG(num_svs);
648 return do_openn(gv, name, len, as_raw, rawmode, rawperm,
649 supplied_fp, &svs, 1);
653 Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode)
655 /* The old body of this is now in non-LAYER part of perlio.c
656 * This is a stub for any XS code which might have been calling it.
658 const char *name = ":raw";
660 PERL_ARGS_ASSERT_DO_BINMODE;
662 #ifdef PERLIO_USING_CRLF
663 if (!(mode & O_BINARY))
666 return PerlIO_binmode(aTHX_ fp, iotype, mode, name);
671 Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp)
673 PERL_ARGS_ASSERT_DO_AEXEC;
675 return do_aexec5(really, mark, sp, 0, 0);
679 #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
681 Perl_do_exec(pTHX_ const char *cmd)
683 PERL_ARGS_ASSERT_DO_EXEC;
685 return do_exec3(cmd,0,0);
689 /* Backwards compatibility. */
691 Perl_init_i18nl14n(pTHX_ int printwarn)
693 return init_i18nl10n(printwarn);
698 DIE(aTHX_ "NOT IMPL LINE %d",__LINE__);
704 DIE(aTHX_ "panic: mapstart"); /* uses grepstart */
708 /* These ops all have the same body as pp_null. */
733 /* Ops that are calls to do_kv. */
744 /* Ops that are simply calls to other ops. */
783 return pp_ssockopt();
788 return pp_getpeername();
798 return pp_ftrowned();
823 return pp_shmwrite();
838 return pp_ghostent();
843 return pp_ghostent();
858 return pp_gprotoent();
863 return pp_gprotoent();
868 return pp_gservent();
873 return pp_gservent();
918 return pp_ftrowned();
923 return pp_ftrowned();
928 return pp_ftrowned();
933 return pp_ftrowned();
938 return pp_ftrowned();
943 return pp_ftrowned();
948 return pp_ftrowned();
953 return pp_ftrowned();
958 return pp_ftrowned();
963 return pp_ftrowned();
1003 return pp_ftrread();
1008 return pp_ftrread();
1013 return pp_ftrread();
1018 return pp_shmwrite();
1023 return pp_shmwrite();
1033 return pp_shmwrite();
1038 return pp_defined();
1053 return pp_defined();
1058 return pp_ucfirst();
1118 return Perl_pp_rv2av(aTHX);
1122 Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
1124 PERL_ARGS_ASSERT_UVUNI_TO_UTF8;
1126 return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0);
1130 Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
1132 PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC;
1134 return is_utf8_string_loclen(s, len, ep, 0);
1138 =for apidoc sv_nolocking
1140 Dummy routine which "locks" an SV when there is no locking module present.
1141 Exists to avoid test for a NULL function pointer and because it could
1142 potentially warn under some level of strict-ness.
1144 "Superseded" by sv_nosharing().
1150 Perl_sv_nolocking(pTHX_ SV *sv)
1152 PERL_UNUSED_CONTEXT;
1153 PERL_UNUSED_ARG(sv);
1158 =for apidoc sv_nounlocking
1160 Dummy routine which "unlocks" an SV when there is no locking module present.
1161 Exists to avoid test for a NULL function pointer and because it could
1162 potentially warn under some level of strict-ness.
1164 "Superseded" by sv_nosharing().
1170 Perl_sv_nounlocking(pTHX_ SV *sv)
1172 PERL_UNUSED_CONTEXT;
1173 PERL_UNUSED_ARG(sv);
1177 Perl_save_long(pTHX_ long int *longp)
1181 PERL_ARGS_ASSERT_SAVE_LONG;
1186 SSPUSHUV(SAVEt_LONG);
1190 Perl_save_iv(pTHX_ IV *ivp)
1194 PERL_ARGS_ASSERT_SAVE_IV;
1203 Perl_save_nogv(pTHX_ GV *gv)
1207 PERL_ARGS_ASSERT_SAVE_NOGV;
1211 SSPUSHUV(SAVEt_NSTAB);
1215 Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
1220 PERL_ARGS_ASSERT_SAVE_LIST;
1222 for (i = 1; i <= maxsarg; i++) {
1223 register SV * const sv = newSV(0);
1224 sv_setsv(sv,sarg[i]);
1226 SSPUSHPTR(sarg[i]); /* remember the pointer */
1227 SSPUSHPTR(sv); /* remember the value */
1228 SSPUSHUV(SAVEt_ITEM);
1233 =for apidoc sv_usepvn_mg
1235 Like C<sv_usepvn>, but also handles 'set' magic.
1241 Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len)
1243 PERL_ARGS_ASSERT_SV_USEPVN_MG;
1245 sv_usepvn_flags(sv,ptr,len, SV_SMAGIC);
1249 =for apidoc sv_usepvn
1251 Tells an SV to use C<ptr> to find its string value. Implemented by
1252 calling C<sv_usepvn_flags> with C<flags> of 0, hence does not handle 'set'
1253 magic. See C<sv_usepvn_flags>.
1259 Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len)
1261 PERL_ARGS_ASSERT_SV_USEPVN;
1263 sv_usepvn_flags(sv,ptr,len, 0);
1267 =for apidoc unpack_str
1269 The engine implementing unpack() Perl function. Note: parameters strbeg, new_s
1270 and ocnt are not used. This call should not be used, use unpackstring instead.
1275 Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s,
1276 const char *strbeg, const char *strend, char **new_s, I32 ocnt,
1279 PERL_ARGS_ASSERT_UNPACK_STR;
1281 PERL_UNUSED_ARG(strbeg);
1282 PERL_UNUSED_ARG(new_s);
1283 PERL_UNUSED_ARG(ocnt);
1285 return unpackstring(pat, patend, s, strend, flags);
1289 =for apidoc pack_cat
1291 The engine implementing pack() Perl function. Note: parameters next_in_list and
1292 flags are not used. This call should not be used; use packlist instead.
1298 Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
1300 PERL_ARGS_ASSERT_PACK_CAT;
1302 PERL_UNUSED_ARG(next_in_list);
1303 PERL_UNUSED_ARG(flags);
1305 packlist(cat, pat, patend, beglist, endlist);
1309 Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, U32 hash)
1311 return (HE *)hv_common(hv, keysv, NULL, 0, 0, HV_FETCH_ISSTORE, val, hash);
1315 Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash)
1317 PERL_ARGS_ASSERT_HV_EXISTS_ENT;
1319 return hv_common(hv, keysv, NULL, 0, 0, HV_FETCH_ISEXISTS, 0, hash)
1324 Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash)
1326 PERL_ARGS_ASSERT_HV_FETCH_ENT;
1328 return (HE *)hv_common(hv, keysv, NULL, 0, 0,
1329 (lval ? HV_FETCH_LVALUE : 0), NULL, hash);
1333 Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash)
1335 PERL_ARGS_ASSERT_HV_DELETE_ENT;
1337 return MUTABLE_SV(hv_common(hv, keysv, NULL, 0, 0, flags | HV_DELETE, NULL,
1342 Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash,
1345 return (SV**) hv_common(hv, NULL, key, klen, flags,
1346 (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), val, hash);
1350 Perl_hv_store(pTHX_ HV *hv, const char *key, I32 klen_i32, SV *val, U32 hash)
1362 return (SV **) hv_common(hv, NULL, key, klen, flags,
1363 (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), val, hash);
1367 Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen_i32)
1372 PERL_ARGS_ASSERT_HV_EXISTS;
1381 return hv_common(hv, NULL, key, klen, flags, HV_FETCH_ISEXISTS, 0, 0)
1386 Perl_hv_fetch(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 lval)
1391 PERL_ARGS_ASSERT_HV_FETCH;
1400 return (SV **) hv_common(hv, NULL, key, klen, flags,
1401 lval ? (HV_FETCH_JUST_SV | HV_FETCH_LVALUE)
1402 : HV_FETCH_JUST_SV, NULL, 0);
1406 Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen_i32, I32 flags)
1411 PERL_ARGS_ASSERT_HV_DELETE;
1415 k_flags = HVhek_UTF8;
1420 return MUTABLE_SV(hv_common(hv, NULL, key, klen, k_flags, flags | HV_DELETE,
1424 /* Functions after here were made mathoms post 5.10.0 but pre 5.8.9 */
1429 return MUTABLE_AV(newSV_type(SVt_PVAV));
1430 /* sv_upgrade does AvREAL_only():
1433 AvMAX(av) = AvFILLp(av) = -1; */
1439 HV * const hv = MUTABLE_HV(newSV_type(SVt_PVHV));
1446 Perl_sv_insert(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len,
1447 const char *const little, const STRLEN littlelen)
1449 PERL_ARGS_ASSERT_SV_INSERT;
1450 sv_insert_flags(bigstr, offset, len, little, littlelen, SV_GMAGIC);
1454 Perl_save_freesv(pTHX_ SV *sv)
1461 Perl_save_mortalizesv(pTHX_ SV *sv)
1465 PERL_ARGS_ASSERT_SAVE_MORTALIZESV;
1467 save_mortalizesv(sv);
1471 Perl_save_freeop(pTHX_ OP *o)
1478 Perl_save_freepv(pTHX_ char *pv)
1491 #ifdef PERL_DONT_CREATE_GVSV
1493 Perl_gv_SVadd(pTHX_ GV *gv)
1495 return gv_SVadd(gv);
1500 Perl_gv_AVadd(pTHX_ GV *gv)
1502 return gv_AVadd(gv);
1506 Perl_gv_HVadd(pTHX_ register GV *gv)
1508 return gv_HVadd(gv);
1512 Perl_gv_IOadd(pTHX_ register GV *gv)
1514 return gv_IOadd(gv);
1520 return MUTABLE_IO(newSV_type(SVt_PVIO));
1523 #endif /* NO_MATHOMS */
1527 * c-indentation-style: bsd
1529 * indent-tabs-mode: t
1532 * ex: set ts=8 sts=4 sw=4 noet: