diff options
| author | Tyge Løvset <[email protected]> | 2022-09-20 09:47:33 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-20 09:47:33 +0200 |
| commit | 6d7873be4a9031ceffef3182ca8cdfa80197c8b0 (patch) | |
| tree | b8c6256cdf869f907517f7b55a81eb7e4f21b439 /include | |
| parent | 498679cde9565add37d685e16ea863db3d014a07 (diff) | |
| download | STC-modified-6d7873be4a9031ceffef3182ca8cdfa80197c8b0.tar.gz STC-modified-6d7873be4a9031ceffef3182ca8cdfa80197c8b0.zip | |
Minor API change for fixed size cstack and cbits only.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/cbits.h | 4 | ||||
| -rw-r--r-- | include/stc/cstack.h | 4 |
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) { |
