summaryrefslogtreecommitdiff
path: root/mg.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 /mg.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 'mg.c')
-rw-r--r--mg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index ce5b99c9f2..d7c68c5e70 100644
--- a/mg.c
+++ b/mg.c
@@ -1607,12 +1607,12 @@ S_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, I32 flags, int
if (n > 1) {
if (mg->mg_ptr) {
if (mg->mg_len >= 0)
- PUSHs(newSVpvn_flags(mg->mg_ptr, mg->mg_len, SVs_TEMP));
+ mPUSHp(mg->mg_ptr, mg->mg_len);
else if (mg->mg_len == HEf_SVKEY)
PUSHs((SV*)mg->mg_ptr);
}
else if (mg->mg_type == PERL_MAGIC_tiedelem) {
- PUSHs(sv_2mortal(newSViv(mg->mg_len)));
+ mPUSHi(mg->mg_len);
}
}
if (n > 2) {