X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utf8.h;h=c87bbf248c36203dd055c30fc40668186700d805;hb=b591c46eb65d6e62eab41547c2c448d20bc047a9;hp=c206b3da39eed972a7fd6adbdea1c81cc8e65cba;hpb=89ebb4a3f2a55825eeed13aaf58db5c73d2140ef;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utf8.h b/utf8.h index c206b3d..c87bbf2 100644 --- a/utf8.h +++ b/utf8.h @@ -42,7 +42,7 @@ EXTCONST unsigned char PL_utf8skip[]; #endif END_EXTERN_C -#define UTF8SKIP(s) PL_utf8skip[*(U8*)s] +#define UTF8SKIP(s) PL_utf8skip[*(const U8*)(s)] /* Native character to iso-8859-1 */ #define NATIVE_TO_ASCII(ch) (ch) @@ -147,12 +147,12 @@ encoded character. * (that is, the two high bits are set). Otherwise we risk loading in the * heavy-duty SWASHINIT and SWASHGET routines unnecessarily. */ -#define isIDFIRST_lazy_if(p,c) ((IN_BYTES || (!c || (*((U8*)p) < 0xc0))) \ +#define isIDFIRST_lazy_if(p,c) ((IN_BYTES || (!c || (*((const U8*)p) < 0xc0))) \ ? isIDFIRST(*(p)) \ - : isIDFIRST_utf8((U8*)p)) -#define isALNUM_lazy_if(p,c) ((IN_BYTES || (!c || (*((U8*)p) < 0xc0))) \ + : isIDFIRST_utf8((const U8*)p)) +#define isALNUM_lazy_if(p,c) ((IN_BYTES || (!c || (*((const U8*)p) < 0xc0))) \ ? isALNUM(*(p)) \ - : isALNUM_utf8((U8*)p)) + : isALNUM_utf8((const U8*)p)) #endif /* EBCDIC vs ASCII */