X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cop.h;h=ed6151e24e179d84ec94a667edcb0823ce8b2d59;hb=51254d33a14eeacb273f244a97f13b86d9e56aa2;hp=ef92d8e97df17d843728171483e3a59cb3d07a2d;hpb=b37c2d43c8bccbefe3985273e9661833102148d0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cop.h b/cop.h index ef92d8e..ed6151e 100644 --- a/cop.h +++ b/cop.h @@ -100,7 +100,7 @@ typedef struct jmpenv JMPENV; #define JMPENV_PUSH(v) \ STMT_START { \ DEBUG_l(Perl_deb(aTHX_ "Setting up jumplevel %p, was %p\n", \ - &cur_env, PL_top_env)); \ + (void*)&cur_env, (void*)PL_top_env)); \ cur_env.je_prev = PL_top_env; \ OP_REG_TO_MEM; \ cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK); \ @@ -113,7 +113,7 @@ typedef struct jmpenv JMPENV; #define JMPENV_POP \ STMT_START { \ DEBUG_l(Perl_deb(aTHX_ "popping jumplevel was %p, now %p\n", \ - PL_top_env, cur_env.je_prev)); \ + (void*)PL_top_env, (void*)cur_env.je_prev)); \ PL_top_env = cur_env.je_prev; \ } STMT_END @@ -146,8 +146,12 @@ struct cop { U32 cop_seq; /* parse sequence number */ I32 cop_arybase; /* array base this line was compiled with */ line_t cop_line; /* line # of this command */ - SV * cop_warnings; /* lexical warnings bitmask */ + /* Beware. mg.c and warnings.pl assume the type of this is STRLEN *: */ + STRLEN * cop_warnings; /* lexical warnings bitmask */ SV * cop_io; /* lexical IO defaults */ + /* compile time state of %^H. See the comment in op.c for how this is + used to recreate a hash to return from caller. */ + struct refcounted_he * cop_hints; }; #ifdef USE_ITHREADS @@ -226,6 +230,18 @@ struct cop { # define OutCopFILE(c) CopFILE(c) #endif +/* CopARYBASE is likely to be removed soon. */ +#define CopARYBASE(c) ((c)->cop_arybase) +#define CopARYBASE_get(c) ((c)->cop_arybase + 0) +#define CopARYBASE_set(c, b) STMT_START { (c)->cop_arybase = (b); } STMT_END + +/* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h) */ +#define CopHINTS_get(c) ((c)->op_private + 0) +#define CopHINTS_set(c, h) STMT_START { \ + (c)->op_private \ + = (U8)((h) & HINT_PRIVATE_MASK); \ + } STMT_END + /* * Here we have some enormously heavy (or at least ponderous) wizardry. */ @@ -254,8 +270,8 @@ struct block_sub { cx->blk_sub.hasargs = hasargs; \ cx->blk_sub.retop = NULL; \ if (!CvDEPTH(cv)) { \ - SvREFCNT_inc_void(cv); \ - SvREFCNT_inc_void(cv); \ + SvREFCNT_inc_simple_void_NN(cv); \ + SvREFCNT_inc_simple_void_NN(cv); \ SAVEFREESV(cv); \ } @@ -417,7 +433,7 @@ struct block_loop { SvREFCNT_dec(cx->blk_loop.iterlval); \ if (CxITERVAR(cx)) { \ if (SvPADMY(cx->blk_loop.itersave)) { \ - SV **s_v_p = CxITERVAR(cx); \ + SV ** const s_v_p = CxITERVAR(cx); \ sv_2mortal(*s_v_p); \ *s_v_p = cx->blk_loop.itersave; \ } \ @@ -646,6 +662,8 @@ L. #define G_KEEPERR 16 /* Append errors to $@, don't overwrite it */ #define G_NODEBUG 32 /* Disable debugging at toplevel. */ #define G_METHOD 64 /* Calling method. */ +#define G_FAKINGEVAL 256 /* Faking en eval context for call_sv or + fold_constants. */ /* flag bits for PL_in_eval */ #define EVAL_NULL 0 /* not in an eval */ @@ -803,3 +821,13 @@ See L. CATCH_SET(multicall_oldcatch); \ LEAVE; \ } STMT_END + +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * + * ex: set ts=8 sts=4 sw=4 noet: + */