This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix mX?PUSH[inup] macros. (Follow-up to #22756 and #22757)
authorMarcus Holland-Moritz <mhx-perl@gmx.net>
Mon, 3 May 2004 20:03:28 +0000 (22:03 +0200)
committerMarcus Holland-Moritz <mhx-perl@gmx.net>
Tue, 4 May 2004 14:30:39 +0000 (14:30 +0000)
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

diff --git a/pp.h b/pp.h
index 520f35d..617d777 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -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