diff options
| author | Tyge Løvset <[email protected]> | 2022-12-20 12:17:32 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-12-20 12:17:32 +0100 |
| commit | 1778629d92849af84239c4b8c1940ed76fd87b8a (patch) | |
| tree | cbe600a280aee2405836c66413e234de071bb231 /include/stc/cstr.h | |
| parent | 21817cae767d72e6007150b639f9365e35502173 (diff) | |
| download | STC-modified-1778629d92849af84239c4b8c1940ed76fd87b8a.tar.gz STC-modified-1778629d92849af84239c4b8c1940ed76fd87b8a.zip | |
Renamed (reverted) cstr_new(lit) => cstr_lit(lit). Old name is deprecated (supported for now).
Diffstat (limited to 'include/stc/cstr.h')
| -rw-r--r-- | include/stc/cstr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h index a0dd1adc..6f774135 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -70,9 +70,11 @@ STC_API char* _cstr_internal_move(cstr* self, size_t pos1, size_t pos2); /**************************** PUBLIC API **********************************/ -#define cstr_new(literal) cstr_from_n(literal, c_strlen_lit(literal)) +#define cstr_lit(literal) cstr_from_n(literal, c_strlen_lit(literal)) #define cstr_NULL (c_INIT(cstr){{{0}, 0}}) #define cstr_toraw(self) cstr_str(self) +#define cstr_new(lit) cstr_lit(lit) /* [deprecated] */ +#define cstr_null cstr_NULL /* [deprecated] */ STC_API char* cstr_reserve(cstr* self, size_t cap); STC_API void cstr_shrink_to_fit(cstr* self); |
