From 2cc7004b6c4549e1be46c2a567acf33609c2a687 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Mon, 3 May 2004 22:03:28 +0200 Subject: [PATCH] Fix mX?PUSH[inup] macros. (Follow-up to #22756 and #22757) Subject: Re: [PATCH] Document limitations in PUSHi et al macros and add new mPUSHi et al macros Message-Id: <20040503200328.24efcda5@r2d2> p4raw-id: //depot/perl@22779 --- pp.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pp.h b/pp.h index 520f35d..617d777 100644 --- a/pp.h +++ b/pp.h @@ -303,17 +303,17 @@ and C. #define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END #define XPUSHundef STMT_START { SvOK_off(TARG); XPUSHs(TARG); } STMT_END -#define PUSHmortal(s) PUSHs(sv_newmortal()) -#define mPUSHp(p,l) STMT_START { sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END -#define mPUSHn(n) STMT_START { sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END -#define mPUSHi(i) STMT_START { sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END -#define mPUSHu(u) STMT_START { sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END - -#define XPUSHmortal(s) STMT_START { EXTEND(sp,1); PUSHmortal; } STMT_END -#define mXPUSHp(p,l) STMT_START { sv_setpvn_mg(XPUSHmortal, (p), (l)); } STMT_END -#define mXPUSHn(n) STMT_START { sv_setnv_mg(XPUSHmortal, (NV)(n)); } STMT_END -#define mXPUSHi(i) STMT_START { sv_setiv_mg(XPUSHmortal, (IV)(i)); } STMT_END -#define mXPUSHu(u) STMT_START { sv_setuv_mg(XPUSHmortal, (UV)(u)); } STMT_END +#define PUSHmortal PUSHs(sv_newmortal()) +#define mPUSHp(p,l) sv_setpvn_mg(PUSHmortal, (p), (l)) +#define mPUSHn(n) sv_setnv_mg(PUSHmortal, (NV)(n)) +#define mPUSHi(i) sv_setiv_mg(PUSHmortal, (IV)(i)) +#define mPUSHu(u) sv_setuv_mg(PUSHmortal, (UV)(u)) + +#define XPUSHmortal XPUSHs(sv_newmortal()) +#define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END +#define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END +#define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END +#define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END #define SETs(s) (*sp = s) #define SETTARG STMT_START { SvSETMAGIC(TARG); SETs(TARG); } STMT_END -- 2.7.4