summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-24 23:03:44 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-24 23:04:03 -0700
commit3c30bf984aa27d52d7c70ff8ce9275b74bb1af49 (patch)
treea3d7fff56991760314433c76f9c2f04d084d942b /pp.c
parent5ff48db8e3239c5f11fd364af28ea58d5f036735 (diff)
downloadperl-3c30bf984aa27d52d7c70ff8ce9275b74bb1af49.tar.gz
pp.c: pp_boolkeys does not need to pop
If it’s going to consume and return exactly one item, it doesn’t need to decrement and increment the stack pointer.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index dd202889c6..7565a9dda1 100644
--- a/pp.c
+++ b/pp.c
@@ -5722,19 +5722,19 @@ PP(pp_boolkeys)
{
dVAR;
dSP;
- HV * const hv = (HV*)POPs;
+ HV * const hv = (HV*)TOPs;
- if (SvTYPE(hv) != SVt_PVHV) { XPUSHs(&PL_sv_no); RETURN; }
+ if (SvTYPE(hv) != SVt_PVHV) RETSETNO;
if (SvRMAGICAL(hv)) {
MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_tied);
if (mg) {
- XPUSHs(magic_scalarpack(hv, mg));
+ SETs(magic_scalarpack(hv, mg));
RETURN;
}
}
- XPUSHs(boolSV(HvUSEDKEYS(hv) != 0));
+ SETs(boolSV(HvUSEDKEYS(hv) != 0));
RETURN;
}