XPUSH*: reuse code from mPUSH* macros
authorEugen Konkov <kes-kes@yandex.ru>
Mon, 5 Jun 2017 08:07:54 +0000 (09:07 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 08:17:04 +0000 (09:17 +0100)
AUTHORS
pp.h

diff --git a/AUTHORS b/AUTHORS
index 40c6393..7ef3c5c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -402,6 +402,7 @@ Erich Rickheit
 Eryq                           <eryq@zeegee.com>
 Etienne Grossman               <etienne@isr.isr.ist.utl.pt>
 Eugene Alterman                        <Eugene.Alterman@bremer-inc.com>
+Eugen Konkov                   <kes-kes@yandex.ru>
 Evan Miller                    <eam@frap.net>
 Evan Zacks                     <zackse@cpan.org>
 Fabien Tassin                  <tassin@eerie.fr>
diff --git a/pp.h b/pp.h
index 3b8f36f..16cb937 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -443,9 +443,9 @@ Does not use C<TARG>.  See also C<L</XPUSHu>>, C<L</mPUSHu>> and C<L</PUSHu>>.
 #define mXPUSHs(s)     XPUSHs(sv_2mortal(s))
 #define XPUSHmortal    XPUSHs(sv_newmortal())
 #define mXPUSHp(p,l)   STMT_START { EXTEND(sp,1); mPUSHp((p), (l)); } STMT_END
-#define mXPUSHn(n)     STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
-#define mXPUSHi(i)     STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
-#define mXPUSHu(u)     STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
+#define mXPUSHn(n)     STMT_START { EXTEND(sp,1); mPUSHn(n); } STMT_END
+#define mXPUSHi(i)     STMT_START { EXTEND(sp,1); mPUSHi(i); } STMT_END
+#define mXPUSHu(u)     STMT_START { EXTEND(sp,1); mPUSHu(u); } STMT_END
 
 #define SETs(s)                (*sp = s)
 #define SETTARG                STMT_START { SvSETMAGIC(TARG); SETs(TARG); } STMT_END