diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-13 03:15:50 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-13 03:15:50 +0000 |
commit | 6b35e00972a13cc3d5e641e82fd498a9d9f6a324 (patch) | |
tree | 3e809e40b478caf5f1a1d7f844fef4f2229189fc /cop.h | |
parent | 155fc61f8f24f48a8180aab9a504f33842272586 (diff) | |
download | perl-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.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 */ |