summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 14:04:16 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 14:04:16 +0000
commit18916d0db6e8b0ac0abf09300cb33647d974ddc0 (patch)
tree310d7227ad38d4f86342bd66d2891c92c7716c6e /op.c
parent6a245ed1e7ef6f728779f8328fb52e42b1aa0b8c (diff)
downloadperl-18916d0db6e8b0ac0abf09300cb33647d974ddc0.tar.gz
Introduce newSVpvs_share() macro.
Gets rid of some hardcoded string lengths. p4raw-id: //depot/perl@26646
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 4 insertions, 4 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,