summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-02-21 20:26:54 +0100
committerTyge Løvset <[email protected]>2021-02-21 20:26:54 +0100
commitb4fe781e2caeed3f0dec670def76df9bf4cefc95 (patch)
treee6bd30027e4d29797655184a57dc06b5669ffa9b
parent9ad1de563150b5819a17ceb07e5bb1a83f39f2b4 (diff)
downloadSTC-modified-b4fe781e2caeed3f0dec670def76df9bf4cefc95.tar.gz
STC-modified-b4fe781e2caeed3f0dec670def76df9bf4cefc95.zip
Renamed using_c*map_keyarg() to using_c*map_keydef().
-rw-r--r--docs/cmap_api.md14
-rw-r--r--docs/csmap_api.md8
-rw-r--r--examples/advanced.c4
-rw-r--r--stc/cmap.h8
-rw-r--r--stc/csmap.h8
5 files changed, 21 insertions, 21 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index b81a9ea3..05217fe8 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -15,19 +15,19 @@ using_cmap(X, Key, Mapped, keyEquals, keyHash, mappedDestroy);
using_cmap(X, Key, Mapped, keyEquals, keyHash, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped);
using_cmap(X, Key, Mapped, keyEqualsRaw, keyHashRaw, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped,
keyDestroy, keyFromRaw, keyToRaw, RawKey);
-using_cmap_keyarg(X, Key, Mapped, keyEquals, keyHash, keyDestroy);
-using_cmap_keyarg(X, Key, Mapped, keyEqualsRaw, keyHashRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
+using_cmap_keydef(X, Key, Mapped, keyEquals, keyHash, keyDestroy);
+using_cmap_keydef(X, Key, Mapped, keyEqualsRaw, keyHashRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
-using_cmap_strkey(X, Mapped); // using_cmap(str, cstr, Mapped, ...)
+using_cmap_strkey(X, Mapped); // using_cmap(X, cstr, Mapped, ...)
using_cmap_strkey(X, Mapped, mappedDestroy);
using_cmap_strkey(X, Mapped, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped);
-using_cmap_strval(X, Key); // using_cmap(str, Key, cstr, ...)
+using_cmap_strval(X, Key); // using_cmap(X, Key, cstr, ...)
using_cmap_strval(X, Key, keyEquals, keyHash);
using_cmap_strval(X, Key, keyEquals, keyHash, keyDestroy);
using_cmap_strval(X, Key, keyEqualsRaw, keyHashRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
-using_cmap_str() // using_cmap(str, cstr, cstr, ...)
+using_cmap_str() // using_cmap(str, cstr, cstr, ...)
```
The `using_cmap()` macro family must be instantiated in the global scope.
Default values are given above for args not specified. `X` is a type tag name and
@@ -293,8 +293,8 @@ static inline VikingRaw viking_toRaw(Viking* vk) {
VikingRaw raw = {vk->name.str, vk->country.str}; return raw;
}
-// With this in place, we use the using_cmap_keyarg() macro to define {Viking -> int} hash map type:
-using_cmap_keyarg(vk, Viking, int, vikingraw_equals, vikingraw_hash,
+// With this in place, we use the using_cmap_keydef() macro to define {Viking -> int} hash map type:
+using_cmap_keydef(vk, Viking, int, vikingraw_equals, vikingraw_hash,
viking_del, viking_fromRaw, viking_toRaw, VikingRaw);
int main()
diff --git a/docs/csmap_api.md b/docs/csmap_api.md
index b8f12267..ae1eb840 100644
--- a/docs/csmap_api.md
+++ b/docs/csmap_api.md
@@ -14,14 +14,14 @@ using_csmap(X, Key, Mapped, keyCompare, mappedDestroy);
using_csmap(X, Key, Mapped, keyCompare, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped);
using_csmap(X, Key, Mapped, keyCompareRaw, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped,
keyDestroy, keyFromRaw, keyToRaw, RawKey);
-using_csmap_keyarg(X, Key, Mapped, keyCompare, keyDestroy);
-using_csmap_keyarg(X, Key, Mapped, keyCompareRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
+using_csmap_keydef(X, Key, Mapped, keyCompare, keyDestroy);
+using_csmap_keydef(X, Key, Mapped, keyCompareRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
-using_csmap_strkey(X, Mapped); // using_csmap(str, cstr, Mapped, ...)
+using_csmap_strkey(X, Mapped); // using_csmap(X, cstr, Mapped, ...)
using_csmap_strkey(X, Mapped, mappedDestroy);
using_csmap_strkey(X, Mapped, mappedDestroy, mappedFromRaw, mappedToRaw, RawMapped);
-using_csmap_strval(X, Key); // using_csmap(str, Key, cstr, ...)
+using_csmap_strval(X, Key); // using_csmap(X, Key, cstr, ...)
using_csmap_strval(X, Key, keyCompare);
using_csmap_strval(X, Key, keyCompare, keyDestroy);
using_csmap_strval(X, Key, keyCompareRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
diff --git a/examples/advanced.c b/examples/advanced.c
index 391230f6..728e056f 100644
--- a/examples/advanced.c
+++ b/examples/advanced.c
@@ -34,9 +34,9 @@ static inline VikingRaw viking_toRaw(Viking* vk) {
VikingRaw raw = {vk->name.str, vk->country.str}; return raw;
}
-// With this in place, we use the using_cmap_keyarg() macro to define {Viking -> int} hash map type:
+// With this in place, we use the using_cmap_keydef() macro to define {Viking -> int} hash map type:
-using_cmap_keyarg(vk, Viking, int, vikingraw_equals, vikingraw_hash,
+using_cmap_keydef(vk, Viking, int, vikingraw_equals, vikingraw_hash,
viking_del, viking_fromRaw, viking_toRaw, VikingRaw);
int main()
diff --git a/stc/cmap.h b/stc/cmap.h
index 64bf4f9c..43fae80d 100644
--- a/stc/cmap.h
+++ b/stc/cmap.h
@@ -84,11 +84,11 @@ typedef struct {size_t idx; uint32_t hx;} chash_bucket_t;
mappedDel, mappedFromRaw, mappedToRaw, RawMapped, \
keyDel, keyFromRaw, keyToRaw, RawKey)
-#define using_cmap_keyarg(...) c_MACRO_OVERLOAD(using_cmap_keyarg, __VA_ARGS__)
-#define using_cmap_keyarg_6(X, Key, Mapped, keyEquals, keyHash, keyDel) \
- using_cmap_keyarg_9(X, Key, Mapped, keyEquals, keyHash, \
+#define using_cmap_keydef(...) c_MACRO_OVERLOAD(using_cmap_keydef, __VA_ARGS__)
+#define using_cmap_keydef_6(X, Key, Mapped, keyEquals, keyHash, keyDel) \
+ using_cmap_keydef_9(X, Key, Mapped, keyEquals, keyHash, \
keyDel, c_no_fromraw, c_default_toraw, Key)
-#define using_cmap_keyarg_9(X, Key, Mapped, keyEqualsRaw, keyHashRaw, \
+#define using_cmap_keydef_9(X, Key, Mapped, keyEqualsRaw, keyHashRaw, \
keyDel, keyFromRaw, keyToRaw, RawKey) \
_using_CHASH(X, cmap, Key, Mapped, keyEqualsRaw, keyHashRaw, \
c_default_del, c_default_fromraw, c_default_toraw, Mapped, \
diff --git a/stc/csmap.h b/stc/csmap.h
index b2ec53d5..0f9fcec2 100644
--- a/stc/csmap.h
+++ b/stc/csmap.h
@@ -66,11 +66,11 @@ int main(void) {
mappedDel, mappedFromRaw, mappedToRaw, RawMapped, \
keyDel, keyFromRaw, keyToRaw, RawKey)
-#define using_csmap_keyarg(...) c_MACRO_OVERLOAD(using_csmap_keyarg, __VA_ARGS__)
-#define using_csmap_keyarg_5(X, Key, Mapped, keyCompare, keyDel) \
- using_csmap_keyarg_8(X, Key, Mapped, keyCompare, \
+#define using_csmap_keydef(...) c_MACRO_OVERLOAD(using_csmap_keydef, __VA_ARGS__)
+#define using_csmap_keydef_5(X, Key, Mapped, keyCompare, keyDel) \
+ using_csmap_keydef_8(X, Key, Mapped, keyCompare, \
keyDel, c_no_fromraw, c_default_toraw, Key)
-#define using_csmap_keyarg_8(X, Key, Mapped, keyCompareRaw, \
+#define using_csmap_keydef_8(X, Key, Mapped, keyCompareRaw, \
keyDel, keyFromRaw, keyToRaw, RawKey) \
_using_AATREE(X, csmap, Key, Mapped, keyCompareRaw, \
c_default_del, c_default_fromraw, c_default_toraw, Mapped, \