From: Pavel Charvat Date: Thu, 14 Jun 2007 13:29:46 +0000 (+0200) Subject: simplified usage utf8_get X-Git-Tag: holmes-import~506^2~76 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4e7942bd61ac37cae1eea237a410d9b86515e700;p=libucw.git simplified usage utf8_get --- diff --git a/lib/unicode.h b/lib/unicode.h index 5e8dac8f..716b1515 100644 --- a/lib/unicode.h +++ b/lib/unicode.h @@ -76,7 +76,7 @@ put1: *p++ = 0x80 | (u & 0x3f); #define UTF8_GET_NEXT if (unlikely((*p & 0xc0) != 0x80)) goto bad; u = (u << 6) | (*p++ & 0x3f) -static inline const byte * +static inline byte * utf8_get(const byte *p, uns *uu) { uns u = *p++; @@ -102,7 +102,7 @@ utf8_get(const byte *p, uns *uu) else goto bad; *uu = u; - return p; + return (byte *)p; } static inline byte *