diff options
-rw-r--r-- | op.c | 8 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | sv.h | 1 |
3 files changed, 6 insertions, 5 deletions
@@ -1624,7 +1624,7 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp) dup_attrlist(attrs))); /* Fake up a method call to import */ - meth = newSVpvn_share("import", 6, 0); + meth = newSVpvs_share("import"); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL|OPf_WANT_VOID, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(arg)), @@ -3071,7 +3071,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) pack = newSVOP(OP_CONST, 0, newSVsv(((SVOP*)idop)->op_sv)); /* Fake up a method call to VERSION */ - meth = newSVpvn_share("VERSION", 7, 0); + meth = newSVpvs_share("VERSION"); veop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(version)), @@ -3095,7 +3095,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) /* Fake up a method call to import/unimport */ meth = aver - ? newSVpvn_share("import",6, 0) : newSVpvn_share("unimport", 8, 0); + ? newSVpvs_share("import") : newSVpvs_share("unimport"); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(arg)), @@ -3104,7 +3104,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) /* Fake up the BEGIN {}, which does its thing immediately. */ newATTRSUB(floor, - newSVOP(OP_CONST, 0, newSVpvn_share("BEGIN", 5, 0)), + newSVOP(OP_CONST, 0, newSVpvs_share("BEGIN")), Nullop, Nullop, append_elem(OP_LINESEQ, @@ -3453,7 +3453,7 @@ S_init_main_stash(pTHX) /* We know that the string "main" will be in the global shared string table, so it's a small saving to use it rather than allocate another 8 bytes. */ - PL_curstname = newSVpvn_share("main", 4, 0); + PL_curstname = newSVpvs_share("main"); gv = gv_fetchpv("main::",TRUE, SVt_PVHV); /* If we hadn't caused another reference to "main" to be in the shared string table above, then it would be worth reordering these two, @@ -1426,6 +1426,7 @@ Like C<sv_catsv> but doesn't process magic. #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) /* Should be named SvCatPVN_utf8_upgrade? */ |