summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-09-11 12:18:43 +0100
committerNicholas Clark <nick@ccl4.org>2013-09-17 13:57:53 +0200
commit6588300d7f2f5b968789662bcdf05c558384614c (patch)
tree7510d8f7867c0410f16f57f0cbaaa274603f865d /utf8.h
parent1640b983ff7c1296873ae4dc0e2163160c853cb3 (diff)
downloadperl-6588300d7f2f5b968789662bcdf05c558384614c.tar.gz
The choice of 7 or 13 byte extended UTF-8 should be based on UVSIZE.
Previously it was based on HAS_QUAD, which is not (as) correct.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/utf8.h b/utf8.h
index 5880aa3bf6..76b89a4246 100644
--- a/utf8.h
+++ b/utf8.h
@@ -233,7 +233,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
(((UV) UTF_CONTINUATION_MASK) << ((sizeof(UV) * CHARBITS) \
- UTF_ACCUMULATION_SHIFT))
-#ifdef HAS_QUAD
+#if UVSIZE >= 8
+# define UTF8_QUAD_MAX UINT64_C(0x1000000000)
+
/* Input is a true Unicode (not-native) code point */
#define OFFUNISKIP(uv) ( (uv) < 0x80 ? 1 : \
(uv) < 0x800 ? 2 : \
@@ -521,10 +523,6 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
#define UNICODE_IS_SUPER(c) ((c) > PERL_UNICODE_MAX)
#define UNICODE_IS_FE_FF(c) ((c) > 0x7FFFFFFF)
-#ifdef HAS_QUAD
-# define UTF8_QUAD_MAX UINT64_C(0x1000000000)
-#endif
-
#define LATIN_SMALL_LETTER_SHARP_S LATIN_SMALL_LETTER_SHARP_S_NATIVE
#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS \
LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE