summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-20 17:39:22 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-20 17:39:22 +0000
commit0588a1501b88b68a0cd58bf7f47f7a5bef1e3c30 (patch)
tree4412b51d037e2ef77d588eb911722871f7d5edc5 /cop.h
parent0cbdab387091772196a9652896d774ed74da2f21 (diff)
downloadperl-0588a1501b88b68a0cd58bf7f47f7a5bef1e3c30.tar.gz
Fix (probable) bug-by-inspection - CxREALEVAL(), CxTRYBLOCK(),
CxFOREACH() and CxFOREACHDEF() should all be masking against CXTYPEMASK rather than their own type number. p4raw-id: //depot/perl@33011
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cop.h b/cop.h
index d8c49613b2..21aeb222fa 100644
--- a/cop.h
+++ b/cop.h
@@ -677,13 +677,13 @@ struct context {
#define CxTYPE(c) ((c)->cx_type & CXTYPEMASK)
#define CxMULTICALL(c) (((c)->cx_type & CXp_MULTICALL) \
== CXp_MULTICALL)
-#define CxREALEVAL(c) (((c)->cx_type & (CXt_EVAL|CXp_REAL)) \
+#define CxREALEVAL(c) (((c)->cx_type & (CXTYPEMASK|CXp_REAL)) \
== (CXt_EVAL|CXp_REAL))
-#define CxTRYBLOCK(c) (((c)->cx_type & (CXt_EVAL|CXp_TRYBLOCK)) \
+#define CxTRYBLOCK(c) (((c)->cx_type & (CXTYPEMASK|CXp_TRYBLOCK)) \
== (CXt_EVAL|CXp_TRYBLOCK))
-#define CxFOREACH(c) (((c)->cx_type & (CXt_LOOP|CXp_FOREACH)) \
+#define CxFOREACH(c) (((c)->cx_type & (CXTYPEMASK|CXp_FOREACH)) \
== (CXt_LOOP|CXp_FOREACH))
-#define CxFOREACHDEF(c) (((c)->cx_type & (CXt_LOOP|CXp_FOREACH|CXp_FOR_DEF))\
+#define CxFOREACHDEF(c) (((c)->cx_type & (CXTYPEMASK|CXp_FOREACH|CXp_FOR_DEF))\
== (CXt_LOOP|CXp_FOREACH|CXp_FOR_DEF))
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))