summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-12-26 21:49:28 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:19:19 +0000
commit75fbe096559dec1fe47be934ddb090971f3d1deb (patch)
tree9252851221139f87e6d68fba4763326705c725a0 /pp_ctl.c
parent788ee336a4716911742183b2eca7ecbc9dfd4a17 (diff)
downloadperl-75fbe096559dec1fe47be934ddb090971f3d1deb.tar.gz
pp_enteriter: add comment about setting cxt type
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 8fa013b801..a65afbbeec 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2137,6 +2137,11 @@ PP(pp_enteriter)
/* OPpITER_DEF (implicit $_) should only occur with a GV iter var */
assert((cxflags & CXp_FOR_GV) || !(PL_op->op_private & OPpITER_DEF));
+ /* Note that this context is initially set as CXt_NULL. Further on
+ * down it's changed to one of the CXt_LOOP_*. Before it's changed,
+ * there mustn't be anything in the blk_loop substruct that requires
+ * freeing or undoing, in case we die in the meantime. And vice-versa.
+ */
PUSHBLOCK(cx, cxflags, gimme, MARK, PL_savestack_ix);
PUSHLOOP_FOR(cx, itervarp, itersave);