summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c8
-rw-r--r--perl.c2
-rw-r--r--sv.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/op.c b/op.c
index e14b4e6df0..7b721829b3 100644
--- a/op.c
+++ b/op.c
@@ -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,
diff --git a/perl.c b/perl.c
index 1aff49da9f..728f91ce20 100644
--- a/perl.c
+++ b/perl.c
@@ -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,
diff --git a/sv.h b/sv.h
index f2bbe106e2..479b44279b 100644
--- a/sv.h
+++ b/sv.h
@@ -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? */