diff options
author | Karl Williamson <khw@cpan.org> | 2021-05-16 16:31:35 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-05-28 15:23:57 -0600 |
commit | 21e13fc5b2910e388a63ad33fba06559024fceb1 (patch) | |
tree | 8e29bcff6da7bbe30307ead32d30914deef3fc35 /utf8.h | |
parent | aacc849b92da13c1abc5b61e3d3c58d7016e3caf (diff) | |
download | perl-21e13fc5b2910e388a63ad33fba06559024fceb1.tar.gz |
utf8.h: Use inRANGE for UNICODE_IS_32_CONTIGUOUS_NONCHARS
This leads to a single conditional instead of two.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -960,8 +960,8 @@ Evaluates to 0xFFFD, the code point of the Unicode REPLACEMENT CHARACTER == UNICODE_BYTE_ORDER_MARK) /* Is 'uv' one of the 32 contiguous-range noncharacters? */ -#define UNICODE_IS_32_CONTIGUOUS_NONCHARS(uv) UNLIKELY((UV) (uv) >= 0xFDD0 \ - && (UV) (uv) <= 0xFDEF) +#define UNICODE_IS_32_CONTIGUOUS_NONCHARS(uv) \ + UNLIKELY(inRANGE(uv, 0xFDD0, 0xFDEF)) /* Is 'uv' one of the 34 plane-ending noncharacters 0xFFFE, 0xFFFF, 0x1FFFE, * 0x1FFFF, ... 0x10FFFE, 0x10FFFF, given that we know that 'uv' is not above |