summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-28 06:34:48 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-28 21:03:52 -0700
commitf3ab9a22e0ff7bcf690cebd72982bbf2687fe5bc (patch)
tree5c3a7264004b22451f26f54d8dbeae3bb4e35c98 /gv.c
parentc00274d3de5cfa48de2639165ef3aceeb949762b (diff)
downloadperl-f3ab9a22e0ff7bcf690cebd72982bbf2687fe5bc.tar.gz
Use leavesublv for all CORE subs
and not just lock, vec and substr. Using a regular leavesub op causes the return values to be copied. There is no need for that, so this commit changes them all to use leavesublv.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gv.c b/gv.c
index 25548ebca3..e2697530a0 100644
--- a/gv.c
+++ b/gv.c
@@ -1400,9 +1400,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
new ATTRSUB. */
(void)core_prototype((SV *)cv, name, code, &opnum);
if (ampable) {
- if (opnum == OP_VEC || opnum == OP_LOCK
- || opnum == OP_SUBSTR)
- CvLVALUE_on(cv);
+ CvLVALUE_on(cv);
newATTRSUB(oldsavestack_ix,
newSVOP(
OP_CONST, 0,
@@ -1417,7 +1415,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
)
);
assert(GvCV(gv) == cv);
- if (opnum == OP_LOCK)
+ if (opnum != OP_VEC && opnum != OP_SUBSTR)
CvLVALUE_off(cv); /* Now *that* was a neat trick. */
LEAVE;
PL_parser = oldparser;