From 99dbf64538ee1c097b9f7e93df5a45dbf1fa3e22 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sat, 23 Jan 2021 02:32:31 +0000 Subject: 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 --- cop.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cop.h') 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 -- cgit v1.2.1