diff options
author | default <nobody@localhost> | 2024-05-21 14:12:15 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-05-21 14:12:15 +0200 |
commit | 4777fc86cb962917a8f34afb3bfa40f26290815d (patch) | |
tree | 268c078531a018f07c1b6d029f14f87134805f7b /xs_unicode.h | |
parent | b95fbe4e438a2ab8a8625875e2eedac38dae572f (diff) |
Added const everywhere.
Diffstat (limited to 'xs_unicode.h')
-rw-r--r-- | xs_unicode.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; |