diff options
| author | spl3g <spleefer6@yandex.ru> | 2025-03-19 18:09:27 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-03-19 18:11:15 +0300 |
| commit | 7a9d112ffa5b954baa43f2eddaa50ec1bd88f96f (patch) | |
| tree | 29cef1d399035470b2b85d45a1c138d5f21cf862 /lib/const_strings.h | |
| parent | 269014e7843fabf395fca10c3364e50825f0fe20 (diff) | |
make const string actually const
Diffstat (limited to 'lib/const_strings.h')
| -rw-r--r-- | lib/const_strings.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/const_strings.h b/lib/const_strings.h index bac629e..aaafd81 100644 --- a/lib/const_strings.h +++ b/lib/const_strings.h @@ -6,13 +6,13 @@ #include <stdbool.h> typedef struct { - char* data; + const char* data; int len; } const_string; -const_string cs_from_parts(char* data, int len); -const_string cs_from_cstr(char* cstr); +const_string cs_from_parts(const char* data, int len); +const_string cs_from_cstr(const char* cstr); const_string cs_slice(const_string src, int from, int to); const_string cs_chop_delim(const_string *src, char delim); bool cs_try_chop_delim(const_string *str, char delim, const_string *dst); |
