diff options
author | Karl Williamson <khw@cpan.org> | 2015-05-15 10:59:54 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-09-04 10:21:17 -0600 |
commit | a62b247b9f3d5cc6214f83defea2e06d12398275 (patch) | |
tree | ec2bd2e98a8464e9160031756326688ac8c7b98a /hv.c | |
parent | 635e76f560b3b3ca075aa2cb5d6d661601968e04 (diff) | |
download | perl-a62b247b9f3d5cc6214f83defea2e06d12398275.tar.gz |
Add macro for converting Latin1 to UTF-8, and use it
This adds a macro that converts a code point in the ASCII 128-255 range
to UTF-8, and changes existing code to use it when the range is known to
be restricted to this one, rather than the previous macro which accepted
a wider range (any code point representable by 2 bytes), but had an
extra test on EBCDIC platforms, hence was larger than necessary and
slightly slower.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3223,7 +3223,7 @@ Perl_refcounted_he_fetch_pvn(pTHX_ const struct refcounted_he *chain, } else { p++; - *q = (char) TWO_BYTE_UTF8_TO_NATIVE(c, *p); + *q = (char) EIGHT_BIT_UTF8_TO_NATIVE(c, *p); } } } @@ -3399,7 +3399,7 @@ Perl_refcounted_he_new_pvn(pTHX_ struct refcounted_he *parent, } else { p++; - *q = (char) TWO_BYTE_UTF8_TO_NATIVE(c, *p); + *q = (char) EIGHT_BIT_UTF8_TO_NATIVE(c, *p); } } } |