In Perl_swash_init(), use call_sv() directly instead of call_method().
authorNicholas Clark <nick@ccl4.org>
Fri, 7 Jan 2011 15:46:57 +0000 (15:46 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 7 Jan 2011 15:46:57 +0000 (15:46 +0000)
This gives a small space saving on this platform, likely due to code being
shared with the other call to call_sv(). (It also removes a level of function
call at runtime.)

utf8.c

diff --git a/utf8.c b/utf8.c
index 8b05cfd..266cb9e 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -1948,7 +1948,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
     /* If we already have a pointer to the method, no need to use call_method()
        to repeat the lookup.  */
     if (method ? call_sv(MUTABLE_SV(method), G_SCALAR)
-       : call_method("SWASHNEW", G_SCALAR))
+       : call_sv(newSVpvs_flags("SWASHNEW", SVs_TEMP), G_SCALAR | G_METHOD))
        retval = newSVsv(*PL_stack_sp--);
     else
        retval = &PL_sv_undef;