summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-10-13 03:15:50 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-10-13 03:15:50 +0000
commit6b35e00972a13cc3d5e641e82fd498a9d9f6a324 (patch)
tree3e809e40b478caf5f1a1d7f844fef4f2229189fc /cop.h
parent155fc61f8f24f48a8180aab9a504f33842272586 (diff)
downloadperl-6b35e00972a13cc3d5e641e82fd498a9d9f6a324.tar.gz
change#1614 merely disabled earlier fix (doh!); undo it and properly
fixup the cop_seq value that must be seen by lexical lookups that emanate within eval'' p4raw-link: @1614 on //depot/perl: bd28dd3ca083953e5682058b02b9529902e14ca9 p4raw-id: //depot/perl@1944
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/cop.h b/cop.h
index f15b1e125d..98ae91f54a 100644
--- a/cop.h
+++ b/cop.h
@@ -199,7 +199,7 @@ struct block {
pm = cx->blk_oldpm, \
gimme = cx->blk_gimme; \
DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Leaving block %ld, type %s\n", \
- (long)cxstack_ix+1,block_type[cx->cx_type]); )
+ (long)cxstack_ix+1,block_type[CxTYPE(cx)]); )
/* Continue a block elsewhere (NEXT and REDO). */
#define TOPBLOCK(cx) cx = &cxstack[cxstack_ix], \
@@ -262,12 +262,14 @@ struct subst {
rxres_free(&cx->sb_rxres)
struct context {
- I32 cx_type; /* what kind of context this is */
+ U32 cx_type; /* what kind of context this is */
union {
struct block cx_blk;
struct subst cx_subst;
} cx_u;
};
+
+#define CXTYPEMASK 0xff
#define CXt_NULL 0
#define CXt_SUB 1
#define CXt_EVAL 2
@@ -275,6 +277,12 @@ struct context {
#define CXt_SUBST 4
#define CXt_BLOCK 5
+/* private flags for CXt_EVAL */
+#define CXp_REAL 0x00000100 /* truly eval'', not a lookalike */
+
+#define CxTYPE(c) ((c)->cx_type & CXTYPEMASK)
+#define CxREALEVAL(c) (((c)->cx_type & (CXt_EVAL|CXp_REAL)) == (CXt_EVAL|CXp_REAL))
+
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))
/* "gimme" values */