Win32 has name conflict with ERROR
[p5sagit/p5-mst-13.2.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index a606397..95fe570 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -48,6 +48,10 @@ END_EXTERN_C
 #define NATIVE_TO_NEED(enc,ch)   (ch)
 #define ASCII_TO_NEED(enc,ch)    (ch)
 
+/* As there are no translations avoid the function wrapper */
+#define Perl_utf8n_to_uvchr Perl_utf8n_to_uvuni
+#define Perl_uvchr_to_utf8  Perl_uvuni_to_utf8
+
 /*
 
  The following table is from Unicode 3.1.
@@ -64,7 +68,9 @@ END_EXTERN_C
 
  */
 
-#define UTF8_IS_INVARIANT(c)           (((UV)c) <  0x80)
+#define UNI_IS_INVARIANT(c)            (((UV)c) <  0x80)
+#define UTF8_IS_INVARIANT(c)           UNI_IS_INVARIANT(NATIVE_TO_UTF(c))
+#define NATIVE_IS_INVARIANT(c)         UNI_IS_INVARIANT(NATIVE_TO_ASCII(c))
 #define UTF8_IS_START(c)               (((U8)c) >= 0xc0 && (((U8)c) <= 0xfd))
 #define UTF8_IS_CONTINUATION(c)                (((U8)c) >= 0x80 && (((U8)c) <= 0xbf))
 #define UTF8_IS_CONTINUED(c)           (((U8)c) &  0x80)