diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-01-04 01:06:10 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-01-04 01:06:10 +0000 |
commit | 6e449a3ab1e3bd9d7e138ca681c733e57d4daa49 (patch) | |
tree | ad260a44d03e2cd4466a3495bd249239dc834046 /mg.c | |
parent | ad25789c15269a04312e0efede81842547aa8212 (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |