diff options
author | David Robillard <d@drobilla.net> | 2016-03-16 16:21:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 84bab08585dec858807a6130bd2d71f304b889f0 (patch) | |
tree | ea78338414095c2c871944a0135028e1399b12fe /src/string_utils.h | |
parent | caa74939cba8b1cd357e553efca9bec5074b1c53 (diff) | |
download | serd-84bab08585dec858807a6130bd2d71f304b889f0.tar.gz serd-84bab08585dec858807a6130bd2d71f304b889f0.tar.bz2 serd-84bab08585dec858807a6130bd2d71f304b889f0.zip |
Use char* for strings in public API
The constant casting just makes user code a mess, for no benefit.
Diffstat (limited to 'src/string_utils.h')
-rw-r--r-- | src/string_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_utils.h b/src/string_utils.h index c6b85ac7..723df710 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -77,14 +77,14 @@ is_base64(const int c) } static inline bool -is_windows_path(const uint8_t* path) +is_windows_path(const char* path) { return is_alpha(path[0]) && (path[1] == ':' || path[1] == '|') && (path[2] == '/' || path[2] == '\\'); } size_t -serd_substrlen(const uint8_t* str, size_t len, SerdNodeFlags* flags); +serd_substrlen(const char* str, size_t len, SerdNodeFlags* flags); static inline uint8_t hex_digit_value(const uint8_t c) @@ -103,7 +103,7 @@ serd_strncasecmp(const char* s1, const char* s2, size_t n) { for (; n > 0 && *s2; s1++, s2++, --n) { if (serd_to_upper(*s1) != serd_to_upper(*s2)) { - return ((*(const uint8_t*)s1 < *(const uint8_t*)s2) ? -1 : +1); + return (*s1 < *s2) ? -1 : +1; } } |