diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-04-25 09:23:25 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-04-25 09:23:25 +0100 |
commit | db4b3a1d2c56c299e29a8bc6aa4d010bf566e9fc (patch) | |
tree | 02f44ce3505082352a2d5ae9c98903f46abce98b /mg.c | |
parent | efaf36747029c85b4d8825318cb4d485a0bb350e (diff) | |
download | perl-db4b3a1d2c56c299e29a8bc6aa4d010bf566e9fc.tar.gz |
In S_magic_methcall1(), tweak the initialisation of arg1 to reduce code size.
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1718,15 +1718,13 @@ S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, const char *meth, I32 flags, if (mg->mg_ptr) { if (mg->mg_len >= 0) { - arg1 = newSVpvn(mg->mg_ptr, mg->mg_len); - sv_2mortal(arg1); + arg1 = newSVpvn_flags(mg->mg_ptr, mg->mg_len, SVs_TEMP); } else if (mg->mg_len == HEf_SVKEY) arg1 = MUTABLE_SV(mg->mg_ptr); } else if (mg->mg_type == PERL_MAGIC_tiedelem) { - arg1 = newSV_type(SVt_IV); - sv_setiv(arg1, (IV)(mg->mg_len)); + arg1 = newSViv((IV)(mg->mg_len)); sv_2mortal(arg1); } if (!arg1) { |