X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utf8.h;h=95fe5706f59bb4f298c3e538a36ba19f56978e70;hb=c7997937a3d3c62c11d46b84cf8e39979d05cd2e;hp=a60639720f951616c7cb440e9f91fd5ee71d325f;hpb=1d72bdf6104ef56ab17c3abedf522be0125851c7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utf8.h b/utf8.h index a606397..95fe570 100644 --- 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)