X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cop.h;h=39a6b01484bb307e9b87dc91499b86dfbe72a48e;hb=3e2a970dfeb55332005c7648ee670aa10bb9b414;hp=3cd3d69d4fa9a9e4bd73f433ffdda854a19c0f29;hpb=b1bc3f345d4dfe19cd94c120c46649336b5cb92b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cop.h b/cop.h index 3cd3d69..39a6b01 100644 --- a/cop.h +++ b/cop.h @@ -298,8 +298,8 @@ struct block_format { #define PUSHSUB_BASE(cx) \ ENTRY_PROBE(GvENAME(CvGV(cv)), \ - CopFILE((COP*)CvSTART(cv)), \ - CopLINE((COP*)CvSTART(cv))); \ + CopFILE((const COP *)CvSTART(cv)), \ + CopLINE((const COP *)CvSTART(cv))); \ \ cx->blk_sub.cv = cv; \ cx->blk_sub.olddepth = CvDEPTH(cv); \ @@ -347,9 +347,9 @@ struct block_format { #define POPSUB(cx,sv) \ STMT_START { \ - RETURN_PROBE(GvENAME(CvGV((CV*)cx->blk_sub.cv)), \ - CopFILE((COP*)CvSTART((CV*)cx->blk_sub.cv)), \ - CopLINE((COP*)CvSTART((CV*)cx->blk_sub.cv))); \ + RETURN_PROBE(GvENAME(CvGV((const CV*)cx->blk_sub.cv)), \ + CopFILE((COP*)CvSTART((const CV*)cx->blk_sub.cv)), \ + CopLINE((COP*)CvSTART((const CV*)cx->blk_sub.cv))); \ \ if (CxHASARGS(cx)) { \ POP_SAVEARRAY(); \ @@ -367,7 +367,7 @@ struct block_format { } \ } \ sv = MUTABLE_SV(cx->blk_sub.cv); \ - if (sv && (CvDEPTH((CV*)sv) = cx->blk_sub.olddepth)) \ + if (sv && (CvDEPTH((const CV*)sv) = cx->blk_sub.olddepth)) \ sv = NULL; \ } STMT_END @@ -610,7 +610,8 @@ struct subst { #define sb_rxres cx_u.cx_subst.sbu_rxres #define sb_rx cx_u.cx_subst.sbu_rx -#define PUSHSUBST(cx) CXINC, cx = &cxstack[cxstack_ix], \ +#ifdef PERL_CORE +# define PUSHSUBST(cx) CXINC, cx = &cxstack[cxstack_ix], \ cx->sb_iters = iters, \ cx->sb_maxiters = maxiters, \ cx->sb_rflags = r_flags, \ @@ -628,11 +629,12 @@ struct subst { rxres_save(&cx->sb_rxres, rx); \ (void)ReREFCNT_inc(rx) -#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE) - -#define POPSUBST(cx) cx = &cxstack[cxstack_ix--]; \ +# define POPSUBST(cx) cx = &cxstack[cxstack_ix--]; \ rxres_free(&cx->sb_rxres); \ ReREFCNT_dec(cx->sb_rx) +#endif + +#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE) struct context { union {