diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2004-05-03 22:03:28 +0200 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2004-05-04 14:30:39 +0000 |
commit | 2cc7004b6c4549e1be46c2a567acf33609c2a687 (patch) | |
tree | 94046607e0280a06fe04ac521e110da57959856e /pp.h | |
parent | ba2ce82289ea4b88b8370b28475c99b2c5c26d53 (diff) | |
download | perl-2cc7004b6c4549e1be46c2a567acf33609c2a687.tar.gz |
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
Diffstat (limited to 'pp.h')
-rw-r--r-- | pp.h | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -303,17 +303,17 @@ and C<PUSHu>. #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 |