summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-07-27 13:32:33 +0200
committerNicholas Clark <nick@ccl4.org>2012-07-28 09:56:58 +0200
commit697f9d37ed09fce0b3aa32beadd149fc18cca6e0 (patch)
tree9d9ee567587ce790254622592cc77f445292763f /pp_sys.c
parentd2f677201f78036f37e6a614b0bc4cfa46cf02d8 (diff)
downloadperl-697f9d37ed09fce0b3aa32beadd149fc18cca6e0.tar.gz
Reorder S_ft_stacking_return_false().
Move the code which deals with setting the return value on perl's stack ahead of the code which calculates which op to run next (the return value of the C function).
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 799ead32ad..891a76d43c 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2910,14 +2910,16 @@ PP(pp_stat)
static OP *
S_ft_stacking_return_false(pTHX_ SV *ret) {
- dSP;
OP *next = NORMAL;
- while (OP_IS_FILETEST(next->op_type)
- && next->op_private & OPpFT_STACKED)
- next = next->op_next;
+ dSP;
+
if (PL_op->op_flags & OPf_REF) XPUSHs(ret);
else SETs(ret);
PUTBACK;
+
+ while (OP_IS_FILETEST(next->op_type)
+ && next->op_private & OPpFT_STACKED)
+ next = next->op_next;
return next;
}