summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2017-09-17 11:10:11 -0700
committerFather Chrysostomos <sprout@cpan.org>2017-10-08 12:06:05 -0700
commit14062320f488e14541f86806767c360405a42e23 (patch)
tree15325e94e5605833483f2ea0847a7f85e36439f8 /gv.c
parent951698f8f098fd4b23f351122836cdb4e03d9f10 (diff)
downloadperl-14062320f488e14541f86806767c360405a42e23.tar.gz
Unbreak gv_fetchmeth_sv
Commit v5.21.6-383-gc290e18 stopped gv_fetchmeth_sv from working cor- rectly when fetching a constant with a utf8 name, because it no longer passed the utf8 flag to the underlying functions. That utf8 flag gets passed to gv_init when upgrading a glob proxy (such as a constant) into a real glob.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 6df78cc013..eebf542e47 100644
--- a/gv.c
+++ b/gv.c
@@ -639,7 +639,8 @@ Perl_gv_fetchmeth_sv(pTHX_ HV *stash, SV *namesv, I32 level, U32 flags)
STRLEN namelen;
PERL_ARGS_ASSERT_GV_FETCHMETH_SV;
if (LIKELY(SvPOK_nog(namesv))) /* common case */
- return gv_fetchmeth_internal(stash, namesv, NULL, 0, level, flags);
+ return gv_fetchmeth_internal(stash, namesv, NULL, 0, level,
+ flags | SvUTF8(namesv));
namepv = SvPV(namesv, namelen);
if (SvUTF8(namesv)) flags |= SVf_UTF8;
return gv_fetchmeth_pvn(stash, namepv, namelen, level, flags);