summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-01-23 02:32:31 +0000
committerPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-02-04 14:09:11 +0000
commit99dbf64538ee1c097b9f7e93df5a45dbf1fa3e22 (patch)
treebf7b524ce01afd970144e9e66d25bd878633d2c5 /cop.h
parentbe319be3519a71b4f83463937d76d7e2ce14e7fe (diff)
downloadperl-99dbf64538ee1c097b9f7e93df5a45dbf1fa3e22.tar.gz
Rename CxTRYBLOCK() to CxEVALBLOCK()
CxTRYBLOCK would be confusing when we add a real CxTRY for try/catch Also renames the associated CXp_TRYBLOCK flag to CXp_EVALBLOCK
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/cop.h b/cop.h
index a1f5b921bb..7a7e831c6a 100644
--- a/cop.h
+++ b/cop.h
@@ -953,7 +953,7 @@ struct context {
/* private flags for CXt_EVAL */
#define CXp_REAL 0x20 /* truly eval'', not a lookalike */
-#define CXp_TRYBLOCK 0x40 /* eval{}, not eval'' or similar */
+#define CXp_EVALBLOCK 0x40 /* eval{}, not eval'' or similar */
/* private flags for CXt_LOOP */
@@ -975,11 +975,15 @@ struct context {
#define CxMULTICALL(c) ((c)->cx_type & CXp_MULTICALL)
#define CxREALEVAL(c) (((c)->cx_type & (CXTYPEMASK|CXp_REAL)) \
== (CXt_EVAL|CXp_REAL))
-#define CxTRYBLOCK(c) (((c)->cx_type & (CXTYPEMASK|CXp_TRYBLOCK)) \
- == (CXt_EVAL|CXp_TRYBLOCK))
+#define CxEVALBLOCK(c) (((c)->cx_type & (CXTYPEMASK|CXp_EVALBLOCK)) \
+ == (CXt_EVAL|CXp_EVALBLOCK))
#define CxFOREACH(c) ( CxTYPE(cx) >= CXt_LOOP_ARY \
&& CxTYPE(cx) <= CXt_LOOP_LIST)
+/* deprecated old name before real try/catch was added */
+#define CXp_TRYBLOCK CXp_EVALBLOCK
+#define CxTRYBLOCK(c) CxEVALBLOCK(c)
+
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))
#define G_SCALAR 2