/* UNIVERSAL methods should be callable without a stash */
if (!stash) {
level = -1; /* probably appropriate */
- if(!(stash = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE)))
+ if(!(stash = gv_stashpvs("UNIVERSAL", FALSE)))
return 0;
}
/* if at top level, try UNIVERSAL */
if (level == 0 || level == -1) {
- HV* const lastchance = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE);
+ HV* const lastchance = gv_stashpvs("UNIVERSAL", FALSE);
if (lastchance) {
if ((gv = gv_fetchmeth(lastchance, name, len,
S_require_errno(pTHX_ GV *gv)
{
dVAR;
- HV* stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
+ HV* stash = gv_stashpvs("Errno", FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;
newSVpvs("Errno"), Nullsv);
LEAVE;
SPAGAIN;
- stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
+ stash = gv_stashpvs("Errno", FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH")))
Perl_croak(aTHX_ "Can't use %%! because Errno.pm is not available");
}
codeset = nl_langinfo(CODESET);
#endif
if (codeset)
- utf8locale = (ibcmp(codeset, STR_WITH_LEN("UTF-8")) == 0 ||
- ibcmp(codeset, STR_WITH_LEN("UTF8") ) == 0);
+ utf8locale = (Perl_ibcmp(aTHX_ codeset, STR_WITH_LEN("UTF-8")) == 0 ||
+ Perl_ibcmp(aTHX_ codeset, STR_WITH_LEN("UTF8") ) == 0);
#if defined(USE_LOCALE)
else { /* nl_langinfo(CODESET) is supposed to correctly
* interpret the locale environment variables,
* but just in case it fails, let's do this manually. */
if (lang)
- utf8locale = (ibcmp(lang, STR_WITH_LEN("UTF-8")) == 0 ||
- ibcmp(lang, STR_WITH_LEN("UTF8") ) == 0);
+ utf8locale = (Perl_ibcmp(aTHX_ lang, STR_WITH_LEN("UTF-8")) == 0 ||
+ Perl_ibcmp(aTHX_ lang, STR_WITH_LEN("UTF8") ) == 0);
#ifdef USE_LOCALE_CTYPE
if (curctype)
- utf8locale = (ibcmp(curctype, STR_WITH_LEN("UTF-8")) == 0 ||
- ibcmp(curctype, STR_WITH_LEN("UTF8") ) == 0);
+ utf8locale = (Perl_ibcmp(aTHX_ curctype, STR_WITH_LEN("UTF-8")) == 0 ||
+ Perl_ibcmp(aTHX_ curctype, STR_WITH_LEN("UTF8") ) == 0);
#endif
if (lc_all)
- utf8locale = (ibcmp(lc_all, STR_WITH_LEN("UTF-8")) == 0 ||
- ibcmp(lc_all, STR_WITH_LEN("UTF8") ) == 0);
+ utf8locale = (Perl_ibcmp(aTHX_ lc_all, STR_WITH_LEN("UTF-8")) == 0 ||
+ Perl_ibcmp(aTHX_ lc_all, STR_WITH_LEN("UTF8") ) == 0);
}
#endif /* USE_LOCALE */
if (utf8locale)
* tell whether HINT_STRICT_REFS is in force or not.
*/
if (!strchr(s,':') && !strchr(s,'\''))
- sv_insert(sv, 0, 0, STR_WITH_LEN("main::"));
+ Perl_sv_insert(aTHX_ sv, 0, 0, STR_WITH_LEN("main::"));
if (i)
(void)rsignal(i, PL_csighandlerp);
else
/* break the line before that space */
opts = space - pv;
- sv_insert(opts_prog, opts, 0,
+ Perl_sv_insert(aTHX_ opts_prog, opts, 0,
STR_WITH_LEN("\\n "));
}
PL_suidscript = -1;
if (PL_e_script) {
- PL_origfilename = savepvn(STR_WITH_LEN("-e"));
+ PL_origfilename = savepvs("-e");
}
else {
/* if find_script() returns, it returns a malloc()-ed value */
SV *
PerlIO_tab_sv(pTHX_ PerlIO_funcs *tab)
{
- HV * const stash = gv_stashpvn(STR_WITH_LEN("PerlIO::Layer"), TRUE);
+ HV * const stash = gv_stashpvs("PerlIO::Layer", TRUE);
SV * const sv = sv_bless(newRV_noinc(newSViv(PTR2IV(tab))), stash);
return sv;
}
!gv_fetchpv("top", 0, SVt_PVFM))
IoTOP_NAME(io) = savesvpv(topname);
else
- IoTOP_NAME(io) = savepvn(STR_WITH_LEN("top"));
+ IoTOP_NAME(io) = savepvs("top");
}
topgv = gv_fetchpv(IoTOP_NAME(io), 0, SVt_PVFM);
if (!topgv || !GvFORM(topgv)) {
Perl_sv_catpvf(aTHX_ name, "[%"IVdf"]", (IV)aindex);
}
else if (subscript_type == FUV_SUBSCRIPT_WITHIN)
- sv_insert(name, 0, 0, STR_WITH_LEN("within "));
+ Perl_sv_insert(aTHX_ name, 0, 0, STR_WITH_LEN("within "));
return name;
}
#define sv_2iv(sv) sv_2iv_flags(sv, SV_GMAGIC)
#define sv_2uv(sv) sv_2uv_flags(sv, SV_GMAGIC)
-#define newSVpvs(str) newSVpvn(STR_WITH_LEN(str))
-#define newSVpvs_share(str) newSVpvn_share(STR_WITH_LEN(str), 0)
-#define sv_catpvs(sv, str) sv_catpvn_flags(sv, STR_WITH_LEN(str), SV_GMAGIC)
+#define newSVpvs(str) Perl_newSVpvn(aTHX_ STR_WITH_LEN(str))
+#define newSVpvs_share(str) Perl_newSVpvn_share(aTHX_ STR_WITH_LEN(str), 0)
+#define sv_catpvs(sv, str) Perl_sv_catpvn_flags(aTHX_ sv, STR_WITH_LEN(str), SV_GMAGIC)
+#define savepvs(str) Perl_savepvn(aTHX_ STR_WITH_LEN(str))
+#define gv_stashpvs(str, create) Perl_gv_stashpvn(aTHX_ STR_WITH_LEN(str), create)
/* Should be named SvCatPVN_utf8_upgrade? */
#define sv_catpvn_utf8_upgrade(dsv, sstr, slen, nsv) \
#define FEATURE_IS_ENABLED(name) \
((0 != (PL_hints & HINT_LOCALIZE_HH)) \
- && feature_is_enabled(STR_WITH_LEN(name)))
+ && S_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
/*
* S_feature_is_enabled
* Check whether the named feature is enabled.