summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-07-17 16:27:31 +0200
committerTyge Løvset <[email protected]>2020-07-17 16:27:31 +0200
commit43605a63919dc328f50bcd4d304ca76ed30629f0 (patch)
treeee636e41f4c6a057eb73414d3e8cb94844520b5c
parent5469d4ca2b05bc8d4c6b287c93fe316013efda5e (diff)
downloadSTC-modified-43605a63919dc328f50bcd4d304ca76ed30629f0.tar.gz
STC-modified-43605a63919dc328f50bcd4d304ca76ed30629f0.zip
Minors.
-rw-r--r--stc/cmap.h8
-rw-r--r--stc/cvec.h16
2 files changed, 12 insertions, 12 deletions
diff --git a/stc/cmap.h b/stc/cmap.h
index a823b9ff..38f4a640 100644
--- a/stc/cmap.h
+++ b/stc/cmap.h
@@ -110,18 +110,18 @@ enum {chash_HASH = 0x7f, chash_USED = 0x80};
/* CSet_str, CMap_str: */
#define declare_CSet_str() \
- declare_CMAPSTR(str, CSet, cset, void, void)
+ declare_CHASH_STR(str, CSet, cset, void, void)
#define declare_CMap_str(...) \
c_MACRO_OVERLOAD(declare_CMap_str, __VA_ARGS__)
#define declare_CMap_str_2(tag, Value) \
- declare_CMAPSTR(tag, CMap, cmap, Value, c_emptyDestroy)
+ declare_CHASH_STR(tag, CMap, cmap, Value, c_emptyDestroy)
#define declare_CMap_str_3(tag, Value, ValueDestroy) \
- declare_CMAPSTR(tag, CMap, cmap, Value, ValueDestroy)
+ declare_CHASH_STR(tag, CMap, cmap, Value, ValueDestroy)
-#define declare_CMAPSTR(tag, CType, ctype, Value, valueDestroy) \
+#define declare_CHASH_STR(tag, CType, ctype, Value, valueDestroy) \
declare_CHASH(tag, CType, ctype, CStr, Value, valueDestroy, cstr_hashRaw, \
cstr_equalsRaw, cstr_destroy, const char*, cstr_getRaw, cstr_make)
diff --git a/stc/cvec.h b/stc/cvec.h
index 3177de5a..80ed051d 100644
--- a/stc/cvec.h
+++ b/stc/cvec.h
@@ -59,12 +59,12 @@ STC_API void \
cvec_##tag##_clear(CVec_##tag* self); \
STC_API void \
cvec_##tag##_pushBack(CVec_##tag* self, Value value); \
-static inline void \
+STC_INLINE void \
cvec_##tag##_popBack(CVec_##tag* self) { \
valueDestroy(&self->data[_cvec_size(*self) - 1]); \
--_cvec_size(*self); \
} \
-static inline Value \
+STC_INLINE Value \
cvec_##tag##_back(CVec_##tag cv) { \
return cv.data[_cvec_size(cv) - 1]; \
} \
@@ -76,7 +76,7 @@ STC_API void \
cvec_##tag##_sort(CVec_##tag* self); \
STC_API size_t \
cvec_##tag##_find(CVec_##tag cv, RawValue rawValue); \
-static inline void \
+STC_INLINE void \
cvec_##tag##_swap(CVec_##tag* a, CVec_##tag* b) { \
c_swap(Value*, a->data, b->data); \
} \
@@ -85,13 +85,13 @@ typedef struct { \
Value *item, *end; \
} CVecIter_##tag, cvec_##tag##_iter_t; \
\
-static inline cvec_##tag##_iter_t \
+STC_INLINE cvec_##tag##_iter_t \
cvec_##tag##_begin(CVec_##tag* vec) { \
const size_t n = cvec_size(*vec); \
cvec_##tag##_iter_t it = {n ? vec->data : NULL, vec->data + n}; \
return it; \
} \
-static inline cvec_##tag##_iter_t \
+STC_INLINE cvec_##tag##_iter_t \
cvec_##tag##_next(cvec_##tag##_iter_t it) { \
if (++it.item == it.end) it.item = NULL; \
return it; \
@@ -207,13 +207,13 @@ cvec_##tag##_sort(CVec_##tag* self) { \
#define _cvec_size(cv) ((size_t *)(cv).data)[-2]
#define _cvec_capacity(cv) ((size_t *)(cv).data)[-1]
-static inline size_t* _cvec_alloced(void* data) {
+STC_INLINE size_t* _cvec_alloced(void* data) {
return data ? ((size_t *) data) - 2 : NULL;
}
-static inline size_t _cvec_safe_size(const void* data) {
+STC_INLINE size_t _cvec_safe_size(const void* data) {
return data ? ((const size_t *) data)[-2] : 0;
}
-static inline size_t _cvec_safe_capacity(const void* data) {
+STC_INLINE size_t _cvec_safe_capacity(const void* data) {
return data ? ((const size_t *) data)[-1] : 0;
}