From: Nicholas Clark Date: Sun, 25 Apr 2010 08:23:25 +0000 (+0100) Subject: In S_magic_methcall1(), tweak the initialisation of arg1 to reduce code size. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db4b3a1d2c56c299e29a8bc6aa4d010bf566e9fc;p=p5sagit%2Fp5-mst-13.2.git In S_magic_methcall1(), tweak the initialisation of arg1 to reduce code size. --- diff --git a/mg.c b/mg.c index 24d2b98..b6bd297 100644 --- a/mg.c +++ b/mg.c @@ -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) {