In Perl_swash_init(), reuse any non-NULL return value from Perl_gv_fetchmeth().
authorNicholas Clark <nick@ccl4.org>
Fri, 7 Jan 2011 14:39:58 +0000 (14:39 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 7 Jan 2011 14:39:58 +0000 (14:39 +0000)
commit88c57d91d4b7719fac6165df201cdb8a4695aa24
tree6553a07c6eb19b3ec423049094f4f55435ceb170
parentbce0fc72705bfed8bcbf4051cdffd6c95559f5c6
In Perl_swash_init(), reuse any non-NULL return value from Perl_gv_fetchmeth().

Historically Perl_swash_init() called Perl_gv_fetchmeth() simply to determine
if the requested package was loaded, and if not, attempt to load it. However,
Perl_gv_fetchmeth() is actually making the same lookup as Perl_call_method()
uses to get a pointer to the relevant method. Hence if we get a non-NULL
return from Perl_gv_fetchmeth() we can pass it directly to Perl_call_sv(), and
save duplicated work.
utf8.c