summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-28 16:53:42 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-28 16:53:42 -0800
commit5695161e025459b946509acf121a1b0f8a6de627 (patch)
treec447d08ce23db446f05a6f34c0ec7ed7f2680b8e /pp.c
parent9fc60eb3f528bacd721b8852138528a61c555fb7 (diff)
downloadperl-5695161e025459b946509acf121a1b0f8a6de627.tar.gz
pp.c:pp_gelem: Less stack fiddling
Instead of pop, pop, push, just do one pop and then replace the remaining item. Also, there is no need to extend the stack here, as pp_gelem returns fewer items than it consumes.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 9d049eaaa0..cb0707e880 100644
--- a/pp.c
+++ b/pp.c
@@ -646,7 +646,7 @@ PP(pp_gelem)
SV *sv = POPs;
STRLEN len;
const char * const elem = SvPV_const(sv, len);
- GV * const gv = MUTABLE_GV(POPs);
+ GV * const gv = MUTABLE_GV(TOPs);
SV * tmpRef = NULL;
sv = NULL;
@@ -712,7 +712,7 @@ PP(pp_gelem)
sv_2mortal(sv);
else
sv = &PL_sv_undef;
- XPUSHs(sv);
+ SETs(sv);
RETURN;
}