diff options
author | David Mitchell <davem@iabyn.com> | 2015-12-21 15:45:57 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:18:36 +0000 |
commit | a7f94955ee46a703770bc2edd470ebd53a0a2f98 (patch) | |
tree | 22cb272c7ee40b75ac117fb2581456a3f8220584 /cop.h | |
parent | 28e0cf42294edeeb3acfd68afd6695f1f8a09632 (diff) | |
download | perl-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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())) |