diff options
| author | Tyge <[email protected]> | 2020-04-26 21:56:48 +0200 |
|---|---|---|
| committer | Tyge <[email protected]> | 2020-04-26 21:56:48 +0200 |
| commit | 782a2e7e627db4a8c5625b8986ea4a92b51e7808 (patch) | |
| tree | 168a08067127ef53d6812ee1fa4a59a1b58b94c6 | |
| parent | cfccbd6d31b2f8c575bdbb1e43d07840fef35345 (diff) | |
| download | STC-modified-782a2e7e627db4a8c5625b8986ea4a92b51e7808.tar.gz STC-modified-782a2e7e627db4a8c5625b8986ea4a92b51e7808.zip | |
Renamed c_defaultDestroy to c_noDestroy
| -rw-r--r-- | benchmark.c | 2 | ||||
| -rw-r--r-- | stc/cdefs.h | 8 | ||||
| -rw-r--r-- | stc/cflist.h | 2 | ||||
| -rw-r--r-- | stc/cmap.h | 8 | ||||
| -rw-r--r-- | stc/cvector.h | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/benchmark.c b/benchmark.c index f4e16546..e759884c 100644 --- a/benchmark.c +++ b/benchmark.c @@ -12,7 +12,7 @@ // Visual Studio: compile with -TP to force C++
-declare_CMap(ii, int64_t, int64_t, c_defaultDestroy, c_lowbias32Hash);
+declare_CMap(ii, int64_t, int64_t, c_noDestroy, c_lowbias32Hash);
declare_CVector_string(s);
declare_CMap(ix, short, short); // test: bucket size = 6 bytes only!
diff --git a/stc/cdefs.h b/stc/cdefs.h index f05c6ea0..54df947d 100644 --- a/stc/cdefs.h +++ b/stc/cdefs.h @@ -52,12 +52,12 @@ #define c_max_alloca (1000)
#define c_swap(T, x, y) { T __t = x; x = y; y = __t; }
-#define c_defaultInitRaw(x) (x)
-#define c_defaultGetRaw(ptr) (*(ptr))
-#define c_noCompare(x, y) 0
+#define c_defaultInitRaw(x) (x)
+#define c_defaultGetRaw(ptr) (*(ptr))
+#define c_noCompare(x, y) (0)
#define c_defaultCompare(x, y) (*(x) == *(y) ? 0 : *(x) < *(y) ? -1 : 1)
#define c_defaultEquals(x, y) (memcmp(x, y, sizeof(*(y))) == 0)
-#define c_defaultDestroy(p) ((void)0)
+#define c_noDestroy(p) ((void)0)
#define c_foreach(it, prefix, container) \
for (prefix##_iter_t it = prefix##_begin(&container); it.item; it = prefix##_next(it))
diff --git a/stc/cflist.h b/stc/cflist.h index 835548b3..bf921c36 100644 --- a/stc/cflist.h +++ b/stc/cflist.h @@ -77,7 +77,7 @@ #define declare_CFList(...) c_MACRO_OVERLOAD(declare_CFList, __VA_ARGS__) #define declare_CFList_2(tag, Value) \ - declare_CFList_3(tag, Value, c_defaultDestroy) + declare_CFList_3(tag, Value, c_noDestroy) #define declare_CFList_3(tag, Value, valueDestroy) \ declare_CFList_4(tag, Value, valueDestroy, c_defaultCompare) #define declare_CFList_4(tag, Value, valueDestroy, valueCompare) \ @@ -36,13 +36,13 @@ enum {cmapentry_HASH=0x7fff, cmapentry_USED=0x8000}; c_MACRO_OVERLOAD(declare_CMap, __VA_ARGS__)
#define declare_CMap_3(tag, Key, Value) \
- declare_CMap_4(tag, Key, Value, c_defaultDestroy)
+ declare_CMap_4(tag, Key, Value, c_noDestroy)
#define declare_CMap_4(tag, Key, Value, valueDestroy) \
declare_CMap_5(tag, Key, Value, valueDestroy, c_defaultHash)
#define declare_CMap_5(tag, Key, Value, valueDestroy, keyHash) \
- declare_CMap_7(tag, Key, Value, valueDestroy, keyHash, c_defaultEquals, c_defaultDestroy)
+ declare_CMap_7(tag, Key, Value, valueDestroy, keyHash, c_defaultEquals, c_noDestroy)
#define declare_CMap_7(tag, Key, Value, valueDestroy, keyHash, keyEquals, keyDestroy) \
declare_CMap_10(tag, Key, Value, valueDestroy, keyHash, keyEquals, keyDestroy, \
@@ -54,7 +54,7 @@ enum {cmapentry_HASH=0x7fff, cmapentry_USED=0x8000}; c_MACRO_OVERLOAD(declare_CMap_stringkey, __VA_ARGS__)
#define declare_CMap_stringkey_2(tag, Value) \
- declare_CMap_stringkey_3(tag, Value, c_defaultDestroy)
+ declare_CMap_stringkey_3(tag, Value, c_noDestroy)
#define declare_CMap_stringkey_3(tag, Value, valueDestroy) \
declare_CMap_10(tag, CString, Value, valueDestroy, cstring_hashRaw, cstring_equalsRaw, cstring_destroy, \
@@ -145,7 +145,7 @@ typedef Value cmap_##tag##_value_t #if !defined(STC_HEADER) || defined(STC_IMPLEMENTATION)
#define implement_CMap_10(tag, Key, Value, valueDestroy, keyHashRaw, keyEqualsRaw, keyDestroy, \
- RawKey, keyGetRaw, keyInitRaw) \
+ RawKey, keyGetRaw, keyInitRaw) \
\
STC_API void \
cmap_##tag##_destroy(CMap_##tag* self) { \
diff --git a/stc/cvector.h b/stc/cvector.h index b86a0908..782c7954 100644 --- a/stc/cvector.h +++ b/stc/cvector.h @@ -34,7 +34,7 @@ #define declare_CVector(...) c_MACRO_OVERLOAD(declare_CVector, __VA_ARGS__)
#define declare_CVector_2(tag, Value) \
- declare_CVector_3(tag, Value, c_defaultDestroy)
+ declare_CVector_3(tag, Value, c_noDestroy)
#define declare_CVector_3(tag, Value, valueDestroy) \
declare_CVector_4(tag, Value, valueDestroy, c_defaultCompare)
#define declare_CVector_4(tag, Value, valueDestroy, valueCompare) \
|
