diff options
| author | tylov <[email protected]> | 2023-08-06 23:24:41 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-08-06 23:24:41 +0200 |
| commit | 10f27b760903a153fe6ebc84b0123acb7a50a0ee (patch) | |
| tree | e2920804c057431d5cb5bbbe534f924b73a387cb /include | |
| parent | f514c5128d62ad53623af4d45bd856b9564bce4f (diff) | |
| parent | 8cfaa56df7ef4dda7c55dc9ae09a4e65403b82d9 (diff) | |
| download | STC-modified-10f27b760903a153fe6ebc84b0123acb7a50a0ee.tar.gz STC-modified-10f27b760903a153fe6ebc84b0123acb7a50a0ee.zip | |
Merge branch 'master' of https://github.com/stclib/STC
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/ccommon.h | 12 | ||||
| -rw-r--r-- | include/stc/priv/template.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index 77f754fa..2528b94f 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -124,12 +124,12 @@ typedef long long _llong; #define c_litstrlen(literal) (c_sizeof("" literal) - 1) #define c_arraylen(a) (intptr_t)(sizeof(a)/sizeof 0[a]) -// Non-owning c-string -typedef const char* crawstr; -#define crawstr_clone(s) (s) -#define crawstr_drop(p) ((void)p) -#define crawstr_cmp(xp, yp) strcmp(*(xp), *(yp)) -#define crawstr_hash(p) cstrhash(*(p)) +// Non-owning c-string "class" +typedef const char* ccharptr; +#define ccharptr_cmp(xp, yp) strcmp(*(xp), *(yp)) +#define ccharptr_hash(p) cstrhash(*(p)) +#define ccharptr_clone(s) (s) +#define ccharptr_drop(p) ((void)p) #define c_sv(...) c_MACRO_OVERLOAD(c_sv, __VA_ARGS__) #define c_sv_1(lit) c_sv_2(lit, c_litstrlen(lit)) diff --git a/include/stc/priv/template.h b/include/stc/priv/template.h index 0f4ac893..49b4d8da 100644 --- a/include/stc/priv/template.h +++ b/include/stc/priv/template.h @@ -111,7 +111,7 @@ #if defined i_key_str #define i_keyclass cstr - #define i_rawclass crawstr + #define i_rawclass ccharptr #ifndef i_tag #define i_tag str #endif |
