From 6457057331d7a98b25cfa48371280da859f005f1 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 7 May 2021 10:13:57 +0200 Subject: Rename to use c_rawstr_*() instead of c_rstr_*(). --- benchmarks/others/clist_v1.h | 2 +- benchmarks/others/csmap_v1.h | 4 ++-- stc/cdeq.h | 2 +- stc/clist.h | 2 +- stc/cmap.h | 4 ++-- stc/csmap.h | 4 ++-- stc/cstr.h | 6 +++--- stc/cvec.h | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/benchmarks/others/clist_v1.h b/benchmarks/others/clist_v1.h index ff777325..80484dba 100644 --- a/benchmarks/others/clist_v1.h +++ b/benchmarks/others/clist_v1.h @@ -69,7 +69,7 @@ _c_using_clist(clist_##X, Value, valueCompare, valueDel, valueFromRaw, valueToRaw, RawValue) #define using_clist_str() \ - _c_using_clist(clist_str, cstr, c_rstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) + _c_using_clist(clist_str, cstr, c_rawstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) #define _c_using_clist_types(CX, Value) \ diff --git a/benchmarks/others/csmap_v1.h b/benchmarks/others/csmap_v1.h index be5f929a..fa86c91c 100644 --- a/benchmarks/others/csmap_v1.h +++ b/benchmarks/others/csmap_v1.h @@ -77,7 +77,7 @@ int main(void) { #define using_csset_str() \ _c_using_aatree_strkey(str, csset_, cstr, @@, @@) #define using_csmap_str() \ - _c_using_aatree(csmap_str, csmap_, cstr, cstr, c_rstr_compare, cstr_del, cstr_del, \ + _c_using_aatree(csmap_str, csmap_, cstr, cstr, c_rawstr_compare, cstr_del, cstr_del, \ cstr_from, cstr_toraw, const char*, cstr_from, cstr_toraw, const char*) @@ -88,7 +88,7 @@ int main(void) { #define using_csmap_strkey_4(X, Mapped, mappedDel, mappedClone) \ _c_using_aatree_strkey(X, csmap_, Mapped, mappedDel, mappedClone) #define _c_using_aatree_strkey(X, C, Mapped, mappedDel, mappedClone) \ - _c_using_aatree(C##X, C, cstr, Mapped, c_rstr_compare, mappedDel, cstr_del, \ + _c_using_aatree(C##X, C, cstr, Mapped, c_rawstr_compare, mappedDel, cstr_del, \ cstr_from, cstr_toraw, const char*, mappedClone, c_trivial_toraw, Mapped) diff --git a/stc/cdeq.h b/stc/cdeq.h index f8b63f1a..dd751fc7 100644 --- a/stc/cdeq.h +++ b/stc/cdeq.h @@ -41,7 +41,7 @@ _c_using_cdeq(cdeq_##X, Value, valueCompareRaw, valueDel, valueFromRaw, valueToRaw, RawValue) #define using_cdeq_str() \ - _c_using_cdeq(cdeq_str, cstr, c_rstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) + _c_using_cdeq(cdeq_str, cstr, c_rawstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) struct cdeq_rep { size_t size, cap; void* base[]; }; diff --git a/stc/clist.h b/stc/clist.h index 4d6b8c1b..a1b01125 100644 --- a/stc/clist.h +++ b/stc/clist.h @@ -69,7 +69,7 @@ _c_using_clist(clist_##X, Value, valueCompareRaw, valueDel, valueFromRaw, valueToRaw, RawValue) #define using_clist_str() \ - _c_using_clist(clist_str, cstr, c_rstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) + _c_using_clist(clist_str, cstr, c_rawstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) #define _c_using_clist_types(CX, Value) \ diff --git a/stc/cmap.h b/stc/cmap.h index 45694708..00034099 100644 --- a/stc/cmap.h +++ b/stc/cmap.h @@ -90,7 +90,7 @@ int main(void) { keyDel, keyFromRaw, keyToRaw, RawKey) #define using_cmap_str() \ - _c_using_chash(cmap_str, cmap_, cstr, cstr, c_rstr_equals, c_rstr_hash, \ + _c_using_chash(cmap_str, cmap_, cstr, cstr, c_rawstr_equals, c_rawstr_hash, \ cstr_del, cstr_from, cstr_toraw, const char*, \ cstr_del, cstr_from, cstr_toraw, const char*) @@ -107,7 +107,7 @@ int main(void) { _c_using_chash_strkey(X, cmap_, Mapped, mappedDel, mappedFromRaw, mappedToRaw, RawMapped) #define _c_using_chash_strkey(X, C, Mapped, mappedDel, mappedFromRaw, mappedToRaw, RawMapped) \ - _c_using_chash(C##X, C, cstr, Mapped, c_rstr_equals, c_rstr_hash, \ + _c_using_chash(C##X, C, cstr, Mapped, c_rawstr_equals, c_rawstr_hash, \ mappedDel, mappedFromRaw, mappedToRaw, RawMapped, \ cstr_del, cstr_from, cstr_toraw, const char*) diff --git a/stc/csmap.h b/stc/csmap.h index 9cffac0d..b0d77e55 100644 --- a/stc/csmap.h +++ b/stc/csmap.h @@ -85,7 +85,7 @@ int main(void) { keyDel, keyFromRaw, keyToRaw, RawKey) #define using_csmap_str() \ - _c_using_aatree(csmap_str, csmap_, cstr, cstr, c_rstr_compare, \ + _c_using_aatree(csmap_str, csmap_, cstr, cstr, c_rawstr_compare, \ cstr_del, cstr_from, cstr_toraw, const char*, \ cstr_del, cstr_from, cstr_toraw, const char*) @@ -102,7 +102,7 @@ int main(void) { _c_using_aatree_strkey(X, csmap_, Mapped, mappedDel, mappedFromRaw, mappedToRaw, RawMapped) #define _c_using_aatree_strkey(X, C, Mapped, mappedDel, mappedFromRaw, mappedToRaw, RawMapped) \ - _c_using_aatree(C##X, C, cstr, Mapped, c_rstr_compare, \ + _c_using_aatree(C##X, C, cstr, Mapped, c_rawstr_compare, \ mappedDel, mappedFromRaw, mappedToRaw, RawMapped, \ cstr_del, cstr_from, cstr_toraw, const char*) diff --git a/stc/cstr.h b/stc/cstr.h index 8270bbf6..90afbc0e 100644 --- a/stc/cstr.h +++ b/stc/cstr.h @@ -167,9 +167,9 @@ cstr_iends_with(cstr s, const char* needle) { } /* cvec/cmap adaption functions: */ -#define c_rstr_compare(rx, ry) strcmp(*(rx), *(ry)) -#define c_rstr_equals(rx, ry) (strcmp(*(rx), *(ry)) == 0) -#define c_rstr_hash(rp, none) c_default_hash(*(rp), strlen(*(rp))) +#define c_rawstr_compare(rx, ry) strcmp(*(rx), *(ry)) +#define c_rawstr_equals(rx, ry) (strcmp(*(rx), *(ry)) == 0) +#define c_rawstr_hash(rp, none) c_default_hash(*(rp), strlen(*(rp))) #define cstr_toraw(xp) ((xp)->str) #define cstr_compare_ref(xp, yp) strcmp((xp)->str, (yp)->str) diff --git a/stc/cvec.h b/stc/cvec.h index da138b66..0c2206e9 100644 --- a/stc/cvec.h +++ b/stc/cvec.h @@ -41,7 +41,7 @@ _c_using_cvec(cvec_##X, Value, valueCompareRaw, valueDel, valueFromRaw, valueToRaw, RawValue) #define using_cvec_str() \ - _c_using_cvec(cvec_str, cstr, c_rstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) + _c_using_cvec(cvec_str, cstr, c_rawstr_compare, cstr_del, cstr_from, cstr_toraw, const char*) struct cvec_rep { size_t size, cap; void* data[]; }; -- cgit v1.2.3