summaryrefslogtreecommitdiff
path: root/sv.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 /sv.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 'sv.c')
-rw-r--r--sv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index e348643ee2..b514753564 100644
--- a/sv.c
+++ b/sv.c
@@ -10912,7 +10912,7 @@ do_mark_cloneable_stash(pTHX_ SV *sv)
ENTER;
SAVETMPS;
PUSHMARK(SP);
- XPUSHs(sv_2mortal(newSVhek(hvname)));
+ mXPUSHs(newSVhek(hvname));
PUTBACK;
call_sv((SV*)GvCV(cloner), G_SCALAR);
SPAGAIN;
@@ -11667,7 +11667,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
ENTER;
SAVETMPS;
PUSHMARK(SP);
- XPUSHs(sv_2mortal(newSVhek(HvNAME_HEK(stash))));
+ mXPUSHs(newSVhek(HvNAME_HEK(stash)));
PUTBACK;
call_sv((SV*)GvCV(cloner), G_DISCARD);
FREETMPS;
@@ -11783,8 +11783,9 @@ Perl_sv_cat_decode(pTHX_ SV *dsv, SV *encoding,
XPUSHs(encoding);
XPUSHs(dsv);
XPUSHs(ssv);
- XPUSHs(offsv = sv_2mortal(newSViv(*offset)));
- XPUSHs(newSVpvn_flags(tstr, tlen, SVs_TEMP));
+ offsv = newSViv(*offset);
+ mXPUSHs(offsv);
+ mXPUSHp(tstr, tlen);
PUTBACK;
call_method("cat_decode", G_SCALAR);
SPAGAIN;