diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-24 23:03:44 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-24 23:04:03 -0700 |
commit | 3c30bf984aa27d52d7c70ff8ce9275b74bb1af49 (patch) | |
tree | a3d7fff56991760314433c76f9c2f04d084d942b /pp.c | |
parent | 5ff48db8e3239c5f11fd364af28ea58d5f036735 (diff) | |
download | perl-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |