summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-07 14:31:09 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:55:48 -0600
commitbc3632a8dfddf6cbc7c8232fd9d4d20f6c35dbd6 (patch)
tree07375c205e7acc93cbe473db8bc3e475f0e681a0 /utf8.h
parent59a449d552a392b1e9daa9122be82f385d8c1f04 (diff)
downloadperl-bc3632a8dfddf6cbc7c8232fd9d4d20f6c35dbd6.tar.gz
Use new clearer named #defines
This converts several areas of code to use the more clearly named macros introduced in the previous commit
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/utf8.h b/utf8.h
index 2bd42fa6ed..bd5315fa32 100644
--- a/utf8.h
+++ b/utf8.h
@@ -319,9 +319,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
* works on both UTF-8 encoded strings and non-encoded, as it returns TRUE in
* each for the exact same set of bit patterns. (And it works on any byte in a
* UTF-8 encoded string) */
-#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_UTF(c))
+#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_UTF8_TO_I8(c))
-#define NATIVE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE8_TO_UNI(c))
+#define NATIVE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_LATIN1(c))
#define MAX_PORTABLE_UTF8_TWO_BYTE 0x3FF /* constrained by EBCDIC */
@@ -431,9 +431,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
* U+110001: \xF4\x90\x80\x81 \xF9\xA2\xA0\xA0\xA1
*/
#ifdef EBCDIC /* Both versions assume well-formed UTF8 */
-# define UTF8_IS_SUPER(s) (NATIVE_TO_I8(* (U8*) (s)) >= 0xF9 \
- && (NATIVE_TO_I8(* (U8*) (s)) > 0xF9 \
- || (NATIVE_TO_I8(* (U8*) ((s)) + 1 >= 0xA2))))
+# define UTF8_IS_SUPER(s) (NATIVE_UTF8_TO_I8(* (U8*) (s)) >= 0xF9 \
+ && (NATIVE_UTF8_TO_I8(* (U8*) (s)) > 0xF9 \
+ || (NATIVE_UTF8_TO_I8(* (U8*) ((s)) + 1 >= 0xA2))))
#else
# define UTF8_IS_SUPER(s) (*(U8*) (s) >= 0xF4 \
&& (*(U8*) (s) > 0xF4 || (*((U8*) (s) + 1) >= 0x90)))