summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorRuslan Zakirov <ruz@bestpractical.com>2012-09-29 20:41:10 +0400
committerFather Chrysostomos <sprout@cpan.org>2013-06-30 11:43:40 -0700
commitc106c2be8b83eeb3799c9f2127c5030a7a04115a (patch)
tree3cf5f79a8d6fc9e0e3a03e41dfe022a0ed16a9d7 /mg.c
parentf26c79ba7e11714d3002a9ea191aed997403b6e8 (diff)
downloadperl-c106c2be8b83eeb3799c9f2127c5030a7a04115a.tar.gz
G_METHOD_NAMED flag for call_method and call_sv
Can be used when it's known that method name has no package part - just method name. With flag set SV with precomputed hash value is used and pp_method_named is called instead of pp_method. Method lookup is faster.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 10e026e3e6..dbf5f5f7f1 100644
--- a/mg.c
+++ b/mg.c
@@ -1745,10 +1745,10 @@ Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags,
}
PUTBACK;
if (flags & G_DISCARD) {
- call_method(meth, G_SCALAR|G_DISCARD);
+ call_method(meth, G_SCALAR|G_DISCARD|G_METHOD_NAMED);
}
else {
- if (call_method(meth, G_SCALAR))
+ if (call_method(meth, G_SCALAR|G_METHOD_NAMED))
ret = *PL_stack_sp--;
}
POPSTACK;