summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-09-29 14:44:55 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:13 -0700
commite577a7ae7d0d8d2c3c4887a8f236604b63916a96 (patch)
treecc1417b4cb393476ddb25da2c0311a4ce11fdd72
parent472394e48953bb7805fb1dfef59cecc52b821bab (diff)
downloadperl-e577a7ae7d0d8d2c3c4887a8f236604b63916a96.tar.gz
Make sv.c:sv_clear account for UTF8 keys in PL_stashcache
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index e8df04fa9c..eea84365c3 100644
--- a/sv.c
+++ b/sv.c
@@ -6074,7 +6074,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
{
if (PL_stashcache)
(void)hv_delete(PL_stashcache, name,
- HvNAMELEN_get((HV*)sv), G_DISCARD);
+ HvNAMEUTF8((HV*)sv) ? -HvNAMELEN_get((HV*)sv) : HvNAMELEN_get((HV*)sv), G_DISCARD);
hv_name_set((HV*)sv, NULL, 0, 0);
}