diff options
author | David Mitchell <davem@iabyn.com> | 2017-07-15 22:26:04 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-07-27 11:30:24 +0100 |
commit | e3ad3bbc29184edf8de9c3acf6b85e79e632b069 (patch) | |
tree | 0d00681ccdf119e106bd7082ad91dd1b6ebc403e /pp_hot.c | |
parent | 3773545d7938a87216a5f326c367a8c445193939 (diff) | |
download | perl-e3ad3bbc29184edf8de9c3acf6b85e79e632b069.tar.gz |
pp_grepwhile: no need to extend the stack
when returning from grep in scalar context, no need to extend the stack by
one when pushing the result count, since the last grep iteration will have
pushed its result which we've just popped.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3579,10 +3579,10 @@ PP(pp_grepwhile) SP = PL_stack_base + POPMARK; /* pop original mark */ if (gimme == G_SCALAR) { if (PL_op->op_private & OPpTRUEBOOL) - XPUSHs(items ? &PL_sv_yes : &PL_sv_zero); + PUSHs(items ? &PL_sv_yes : &PL_sv_zero); else { dTARGET; - XPUSHi(items); + PUSHi(items); } } else if (gimme == G_ARRAY) |