diff options
author | Tony Cook <tony@develop-help.com> | 2013-09-11 16:30:43 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-09-16 14:16:03 +1000 |
commit | 5f39160de676c8a884597fdd3044c993e6c42555 (patch) | |
tree | 216d53d80493a7bbc7d6f131abced97f20d3de1a /hv.h | |
parent | 791f8f9aa5a989a2ccf7f9fae40f68bf65f86f9b (diff) | |
download | perl-5f39160de676c8a884597fdd3044c993e6c42555.tar.gz |
[perl #79074] make sure HeSVKEY_force() preserves UTF8ness (pvn)
HeSVKEY_force() is only used in two places in core.
In the first case, the key is always stored as a SV (when handling tie
magic, since NEXTKEY can only return a SV)
The second case is in B::HE, but I don't see a way to create a B::HE object
from a hash.
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -367,7 +367,9 @@ C<SV*>. ((HeKLEN(he) == HEf_SVKEY) ? \ HeKEY_sv(he) : \ newSVpvn_flags(HeKEY(he), \ - HeKLEN(he), SVs_TEMP)) : \ + HeKLEN(he), \ + SVs_TEMP | \ + ( HeKUTF8(he) ? SVf_UTF8 : 0 ))) : \ &PL_sv_undef) #define HeSVKEY_set(he,sv) ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv)) |