summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-09-20 09:47:33 +0200
committerTyge Løvset <[email protected]>2022-09-20 09:47:33 +0200
commit6d7873be4a9031ceffef3182ca8cdfa80197c8b0 (patch)
treeb8c6256cdf869f907517f7b55a81eb7e4f21b439
parent498679cde9565add37d685e16ea863db3d014a07 (diff)
downloadSTC-modified-6d7873be4a9031ceffef3182ca8cdfa80197c8b0.tar.gz
STC-modified-6d7873be4a9031ceffef3182ca8cdfa80197c8b0.zip
Minor API change for fixed size cstack and cbits only.
-rw-r--r--include/stc/cbits.h4
-rw-r--r--include/stc/cstack.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/stc/cbits.h b/include/stc/cbits.h
index f6f57bcb..06871934 100644
--- a/include/stc/cbits.h
+++ b/include/stc/cbits.h
@@ -123,7 +123,7 @@ STC_INLINE bool _cbits_disjoint(const uint64_t* set, const uint64_t* other, cons
struct { uint64_t *data64; size_t _size; } typedef i_type;
STC_INLINE cbits cbits_init(void) { return c_make(cbits){NULL}; }
-STC_INLINE void cbits_inits(cbits* self) { self->data64 = NULL; self->_size = 0; }
+STC_INLINE void cbits_create(cbits* self) { self->data64 = NULL; self->_size = 0; }
STC_INLINE void cbits_drop(cbits* self) { c_free(self->data64); }
STC_INLINE size_t cbits_size(const cbits* self) { return self->_size; }
@@ -195,7 +195,7 @@ STC_INLINE cbits cbits_with_pattern(const size_t size, const uint64_t pattern) {
struct { uint64_t data64[(i_capacity - 1)/64 + 1]; } typedef i_type;
STC_INLINE i_type _i_memb(_init)(void) { return c_make(i_type){0}; }
-STC_INLINE void _i_memb(_inits)(i_type* self) {}
+STC_INLINE void _i_memb(_create)(i_type* self) {}
STC_INLINE void _i_memb(_drop)(i_type* self) {}
STC_INLINE size_t _i_memb(_size)(const i_type* self) { return i_capacity; }
STC_INLINE i_type _i_memb(_move)(i_type* self) { return *self; }
diff --git a/include/stc/cstack.h b/include/stc/cstack.h
index da38f508..a0c6e042 100644
--- a/include/stc/cstack.h
+++ b/include/stc/cstack.h
@@ -52,10 +52,10 @@ STC_INLINE _cx_self _cx_memb(_init)(void) {
}
#ifdef i_capacity
-STC_INLINE void _cx_memb(_inits)(_cx_self* self)
+STC_INLINE void _cx_memb(_create)(_cx_self* self)
{ self->_len = 0; }
#else
-STC_INLINE void _cx_memb(_inits)(_cx_self* self)
+STC_INLINE void _cx_memb(_create)(_cx_self* self)
{ self->_len = 0; self->_cap = 0; self->data = NULL; }
STC_INLINE _cx_self _cx_memb(_with_capacity)(size_t cap) {