diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-09-25 22:15:55 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 13:01:06 -0700 |
commit | 772d5078e19623501bc9e2e30401b270f2b64bcc (patch) | |
tree | 40033bb13cd2bb2fb414c1e2c880f01e202814ed /gv.c | |
parent | c5540e1cf88a13d2e3c4bd0f68265301c762bc26 (diff) | |
download | perl-772d5078e19623501bc9e2e30401b270f2b64bcc.tar.gz |
gv.c: gv_fetchmeth_pvn UTF8 cleanup.
Since gv_fetchmeth_pvn is primarily used from within gv.c,
and not much of anything is passing in the flag yet, this has
no visible changes on the Perl level; So tests remain
entirely in XS::APItest for the time being.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -665,7 +665,7 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, topgen_cmp = HvMROMETA(stash)->cache_gen + PL_sub_generation; /* check locally for a real method or a cache entry */ - gvp = (GV**)hv_fetch(stash, name, len, create); + gvp = (GV**)hv_fetch(stash, name, is_utf8 ? -len : len, create); if(gvp) { topgv = *gvp; have_gv: @@ -699,7 +699,8 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, if (packlen >= 7 && strEQ(hvname + packlen - 7, "::SUPER")) { HV* basestash; packlen -= 7; - basestash = gv_stashpvn(hvname, packlen, GV_ADD); + basestash = gv_stashpvn(hvname, packlen, + GV_ADD | (HvNAMEUTF8(stash) ? SVf_UTF8 : 0)); linear_av = mro_get_linear_isa(basestash); } else { @@ -721,7 +722,7 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, assert(cstash); - gvp = (GV**)hv_fetch(cstash, name, len, 0); + gvp = (GV**)hv_fetch(cstash, name, is_utf8 ? -len : len, 0); if (!gvp) { if (len > 1 && HvNAMELEN_get(cstash) == 4) { const char *hvname = HvNAME(cstash); assert(hvname); |