From: Nicholas Clark Date: Sun, 20 Jan 2008 18:03:27 +0000 (+0000) Subject: Extend PUSHFORMAT() to take a second parameter to set retop, to save X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10067d9ac787a7e27e17175ac3e209ef628b8aec;p=p5sagit%2Fp5-mst-13.2.git Extend PUSHFORMAT() to take a second parameter to set retop, to save NULLing it and then reassigning. p4raw-id: //depot/perl@33012 --- diff --git a/cop.h b/cop.h index 21aeb22..5c80173 100644 --- a/cop.h +++ b/cop.h @@ -322,10 +322,10 @@ struct block_sub { cx->blk_sub.lval = 0; -#define PUSHFORMAT(cx) \ +#define PUSHFORMAT(cx, retop) \ cx->blk_sub.cv = cv; \ cx->blk_sub.gv = gv; \ - cx->blk_sub.retop = NULL; \ + cx->blk_sub.retop = (retop); \ cx->blk_sub.hasargs = 0; \ cx->blk_sub.dfoutgv = PL_defoutgv; \ SvREFCNT_inc_void(cx->blk_sub.dfoutgv) diff --git a/pp_sys.c b/pp_sys.c index da07e46..b8fa1a9 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1244,8 +1244,7 @@ S_doform(pTHX_ CV *cv, GV *gv, OP *retop) SAVETMPS; PUSHBLOCK(cx, CXt_FORMAT, PL_stack_sp); - PUSHFORMAT(cx); - cx->blk_sub.retop = retop; + PUSHFORMAT(cx, retop); SAVECOMPPAD(); PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);