]> mj.ucw.cz Git - libucw.git/commitdiff
simplified usage utf8_get
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Thu, 14 Jun 2007 13:29:46 +0000 (15:29 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Thu, 14 Jun 2007 13:29:46 +0000 (15:29 +0200)
lib/unicode.h

index 5e8dac8f91dd553cbfeef1c253c80bc7ef1200ba..716b15151350e06deaca0f905f85afcc7414381a 100644 (file)
@@ -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 *