summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-07-06 04:31:08 -0300
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:06 -0700
commit499321d39221df050fd12158b300e0d5f2c83941 (patch)
tree0f6b5096e1e0e58b08e5184df9b060d10f8cc30b /gv.c
parent772d5078e19623501bc9e2e30401b270f2b64bcc (diff)
downloadperl-499321d39221df050fd12158b300e0d5f2c83941.tar.gz
gv.c: gv_fetchmeth_pvn_autoload UTF8 cleanup.
As with the previous commit, no Perl-level visible changes.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index 0cc3207caf..3ea5e21ba0 100644
--- a/gv.c
+++ b/gv.c
@@ -840,7 +840,7 @@ Currently, the only significant value for C<flags> is SVf_UTF8.
GV *
Perl_gv_fetchmeth_pvn_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, U32 flags)
{
- GV *gv = gv_fetchmeth_pvn(stash, name, len, level, 0);
+ GV *gv = gv_fetchmeth_pvn(stash, name, len, level, flags);
PERL_ARGS_ASSERT_GV_FETCHMETH_PVN_AUTOLOAD;
@@ -860,7 +860,7 @@ Perl_gv_fetchmeth_pvn_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I3
/* Have an autoload */
if (level < 0) /* Cannot do without a stub */
gv_fetchmeth_pvn(stash, name, len, 0, flags);
- gvp = (GV**)hv_fetch(stash, name, len, (level >= 0));
+ gvp = (GV**)hv_fetch(stash, name, (flags & SVf_UTF8) ? -len : len, (level >= 0));
if (!gvp)
return NULL;
return *gvp;