summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-05-16 16:31:35 -0600
committerKarl Williamson <khw@cpan.org>2021-05-28 15:23:57 -0600
commit21e13fc5b2910e388a63ad33fba06559024fceb1 (patch)
tree8e29bcff6da7bbe30307ead32d30914deef3fc35 /utf8.h
parentaacc849b92da13c1abc5b61e3d3c58d7016e3caf (diff)
downloadperl-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.h b/utf8.h
index 20b845734c..56bb283b2d 100644
--- a/utf8.h
+++ b/utf8.h
@@ -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