From 4777fc86cb962917a8f34afb3bfa40f26290815d Mon Sep 17 00:00:00 2001 From: default Date: Tue, 21 May 2024 14:12:15 +0200 Subject: Added const everywhere. --- xs_unicode.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xs_unicode.h') diff --git a/xs_unicode.h b/xs_unicode.h index 6654da4..1799d89 100644 --- a/xs_unicode.h +++ b/xs_unicode.h @@ -6,7 +6,7 @@ int _xs_utf8_enc(char buf[4], unsigned int cpoint); int xs_is_utf8_cont_byte(char c); - unsigned int xs_utf8_dec(char **str); + unsigned int xs_utf8_dec(const char **str); int xs_unicode_width(unsigned int cpoint); int xs_is_surrogate(unsigned int cpoint); unsigned int xs_surrogate_dec(unsigned int p1, unsigned int p2); @@ -66,10 +66,10 @@ int xs_is_utf8_cont_byte(char c) } -unsigned int xs_utf8_dec(char **str) +unsigned int xs_utf8_dec(const char **str) /* decodes an utf-8 char inside str and updates the pointer */ { - char *p = *str; + const char *p = *str; unsigned int cpoint = 0; unsigned char c = *p++; int cb = 0; -- cgit v1.2.3