diff options
author | Karl Williamson <khw@cpan.org> | 2015-10-29 09:27:48 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-11-09 10:53:32 -0700 |
commit | 7c560c3beefbb9946463c9f7b946a13f02f319d8 (patch) | |
tree | ba4d17570f8dfc34c39d16e741e8aa8c540797e3 /utf8.h | |
parent | 111e8ed9ecc83b21b1472dfeafdb1e1918ddd493 (diff) | |
download | perl-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.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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) \ |