summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-04 01:06:10 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-04 01:06:10 +0000
commit6e449a3ab1e3bd9d7e138ca681c733e57d4daa49 (patch)
treead260a44d03e2cd4466a3495bd249239dc834046 /av.c
parentad25789c15269a04312e0efede81842547aa8212 (diff)
downloadperl-6e449a3ab1e3bd9d7e138ca681c733e57d4daa49.tar.gz
Add macros mPUSHs() and mXPUSHs() for pushing SVs on the stack
and mortalizing them. Use these macros where possible. And also mX?PUSH[inpu] where possible. p4raw-id: //depot/perl@32821
Diffstat (limited to 'av.c')
-rw-r--r--av.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/av.c b/av.c
index fcb63e5664..343274ff06 100644
--- a/av.c
+++ b/av.c
@@ -77,7 +77,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key)
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(SvTIED_obj((SV*)av, mg));
- PUSHs(sv_2mortal(newSViv(key+1)));
+ mPUSHi(key + 1);
PUTBACK;
call_method("EXTEND", G_SCALAR|G_DISCARD);
POPSTACK;
@@ -762,7 +762,7 @@ Perl_av_fill(pTHX_ register AV *av, I32 fill)
PUSHMARK(SP);
EXTEND(SP,2);
PUSHs(SvTIED_obj((SV*)av, mg));
- PUSHs(sv_2mortal(newSViv(fill+1)));
+ mPUSHi(fill + 1);
PUTBACK;
call_method("STORESIZE", G_SCALAR|G_DISCARD);
POPSTACK;