summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-12-21 15:45:57 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:36 +0000
commita7f94955ee46a703770bc2edd470ebd53a0a2f98 (patch)
tree22cb272c7ee40b75ac117fb2581456a3f8220584 /cop.h
parent28e0cf42294edeeb3acfd68afd6695f1f8a09632 (diff)
downloadperl-a7f94955ee46a703770bc2edd470ebd53a0a2f98.tar.gz
fix CxFOREACH
It wasn't detecting CXt_LOOP_LAZYIV as a 'for' loop type. This only affected 'given' and 'break' (which need to distinguish between being in a 'given' block and being in a 'for' block).
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cop.h b/cop.h
index ceb19ef440..5ef01d1204 100644
--- a/cop.h
+++ b/cop.h
@@ -983,7 +983,7 @@ struct subst {
U8 sbu_rflags;
U16 sbu_rxtainted;
I32 sbu_oldsaveix; /* same as blku_oldsaveix */
- /* all the fields above must be aligned with same-sized fields as blku * */
+ /* all the fields above must be aligned with same-sized fields as blk_u */
SSize_t sbu_iters;
SSize_t sbu_maxiters;
char * sbu_orig;
@@ -1108,7 +1108,7 @@ struct context {
== (CXt_EVAL|CXp_REAL))
#define CxTRYBLOCK(c) (((c)->cx_type & (CXTYPEMASK|CXp_TRYBLOCK)) \
== (CXt_EVAL|CXp_TRYBLOCK))
-#define CxFOREACH(c) ( CxTYPE(cx) >= CXt_LOOP_LAZYSV \
+#define CxFOREACH(c) ( CxTYPE(cx) >= CXt_LOOP_LAZYIV \
&& CxTYPE(cx) <= CXt_LOOP_ARY)
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))