summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-10-29 09:27:48 -0600
committerKarl Williamson <khw@cpan.org>2015-11-09 10:53:32 -0700
commit7c560c3beefbb9946463c9f7b946a13f02f319d8 (patch)
treeba4d17570f8dfc34c39d16e741e8aa8c540797e3 /utf8.h
parent111e8ed9ecc83b21b1472dfeafdb1e1918ddd493 (diff)
downloadperl-7c560c3beefbb9946463c9f7b946a13f02f319d8.tar.gz
utf8.h: Move #define within file
This #define has, until the next commit, not been needed on EBCDIC platforms; move it in preparation for that commit.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/utf8.h b/utf8.h
index bc6e0025ab..4f01277187 100644
--- a/utf8.h
+++ b/utf8.h
@@ -254,13 +254,6 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
/* 2**UTF_ACCUMULATION_SHIFT - 1 */
#define UTF_CONTINUATION_MASK ((U8)0x3f)
-/* If a value is anded with this, and the result is non-zero, then using the
- * original value in UTF8_ACCUMULATE will overflow, shifting bits off the left
- * */
-#define UTF_ACCUMULATION_OVERFLOW_MASK \
- (((UV) UTF_CONTINUATION_MASK) << ((sizeof(UV) * CHARBITS) \
- - UTF_ACCUMULATION_SHIFT))
-
#if UVSIZE >= 8
# define UTF8_QUAD_MAX UINT64_C(0x1000000000)
@@ -346,6 +339,13 @@ encoded as UTF-8. C<cp> is a native (ASCII or EBCDIC) code point if less than
| ((NATIVE_UTF8_TO_I8((U8)new)) \
& UTF_CONTINUATION_MASK))
+/* If a value is anded with this, and the result is non-zero, then using the
+ * original value in UTF8_ACCUMULATE will overflow, shifting bits off the left
+ * */
+#define UTF_ACCUMULATION_OVERFLOW_MASK \
+ (((UV) UTF_CONTINUATION_MASK) << ((sizeof(UV) * CHARBITS) \
+ - UTF_ACCUMULATION_SHIFT))
+
/* This works in the face of malformed UTF-8. */
#define UTF8_IS_NEXT_CHAR_DOWNGRADEABLE(s, e) (UTF8_IS_DOWNGRADEABLE_START(*s) \
&& ( (e) - (s) > 1) \