From: Nicholas Clark Date: Fri, 4 Jan 2008 20:27:42 +0000 (+0000) Subject: Re-implement mPUSHp() and mXPUSHp() using Perl_newSVpvn_flags(), which X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f14ea018e8d1f6c6a67be29ee2ae899993d0f0e;p=p5sagit%2Fp5-mst-13.2.git Re-implement mPUSHp() and mXPUSHp() using Perl_newSVpvn_flags(), which results in slightly smaller object code. (No extra work is done.) p4raw-id: //depot/perl@32834 --- diff --git a/pp.h b/pp.h index 47a48d5..7b5f322 100644 --- a/pp.h +++ b/pp.h @@ -305,14 +305,14 @@ Does not use C. See also C, C and C. #define mPUSHs(s) PUSHs(sv_2mortal(s)) #define PUSHmortal PUSHs(sv_newmortal()) -#define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l)) +#define mPUSHp(p,l) PUSHs(newSVpvn_flags((p), (l), SVs_TEMP)) #define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n)) #define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i)) #define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u)) #define mXPUSHs(s) XPUSHs(sv_2mortal(s)) #define XPUSHmortal XPUSHs(sv_newmortal()) -#define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END +#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