diff options
| author | Tyge Løvset <[email protected]> | 2022-10-28 09:42:50 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-28 09:42:50 +0200 |
| commit | 0243b64f830f55b924274cbc63f5dd1ed518c26f (patch) | |
| tree | 5db964f8eab0483feb4a695eed20adda75612554 /include | |
| parent | 7f03a0a99daaa3df326f2904091affe55e910156 (diff) | |
| download | STC-modified-0243b64f830f55b924274cbc63f5dd1ed518c26f.tar.gz STC-modified-0243b64f830f55b924274cbc63f5dd1ed518c26f.zip | |
Renamed semi-internal macro (used for c++ compability) c_make => c_init.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/alt/csmap.h | 4 | ||||
| -rw-r--r-- | include/stc/alt/cstr.h | 4 | ||||
| -rw-r--r-- | include/stc/carc.h | 2 | ||||
| -rw-r--r-- | include/stc/carr2.h | 4 | ||||
| -rw-r--r-- | include/stc/carr3.h | 4 | ||||
| -rw-r--r-- | include/stc/cbits.h | 4 | ||||
| -rw-r--r-- | include/stc/cbox.h | 4 | ||||
| -rw-r--r-- | include/stc/ccommon.h | 8 | ||||
| -rw-r--r-- | include/stc/cdeq.h | 10 | ||||
| -rw-r--r-- | include/stc/clist.h | 6 | ||||
| -rw-r--r-- | include/stc/cmap.h | 8 | ||||
| -rw-r--r-- | include/stc/cpque.h | 2 | ||||
| -rw-r--r-- | include/stc/crandom.h | 4 | ||||
| -rw-r--r-- | include/stc/csmap.h | 2 | ||||
| -rw-r--r-- | include/stc/cstack.h | 4 | ||||
| -rw-r--r-- | include/stc/cstr.h | 16 | ||||
| -rw-r--r-- | include/stc/csview.h | 8 | ||||
| -rw-r--r-- | include/stc/cvec.h | 8 |
18 files changed, 51 insertions, 51 deletions
diff --git a/include/stc/alt/csmap.h b/include/stc/alt/csmap.h index 086071f5..888c6b8c 100644 --- a/include/stc/alt/csmap.h +++ b/include/stc/alt/csmap.h @@ -130,7 +130,7 @@ _cx_memb(_clear)(_cx_self* self) STC_INLINE _cx_raw _cx_memb(_value_toraw)(_cx_value* val) { return _i_SET_ONLY( i_keyto(val) ) - _i_MAP_ONLY( c_make(_cx_raw){i_keyto((&val->first)), + _i_MAP_ONLY( c_init(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} ); } @@ -471,7 +471,7 @@ _cx_memb(_clone_r_)(_cx_node *tn) { STC_DEF _cx_self _cx_memb(_clone)(_cx_self cx) { - return c_make(_cx_self){_cx_memb(_clone_r_)(cx.root), cx.size}; + return c_init(_cx_self){_cx_memb(_clone_r_)(cx.root), cx.size}; } #endif // !_i_no_clone diff --git a/include/stc/alt/cstr.h b/include/stc/alt/cstr.h index e38cff0f..fd1d5bb1 100644 --- a/include/stc/alt/cstr.h +++ b/include/stc/alt/cstr.h @@ -64,7 +64,7 @@ STC_INLINE cstr cstr_init() { return cstr_null; } STC_INLINE const char* cstr_str(const cstr* self) { return self->str; } #define cstr_toraw(self) (self)->str STC_INLINE csview cstr_sv(const cstr* self) - { return c_make(csview){self->str, _cstr_p(self)->size}; } + { return c_init(csview){self->str, _cstr_p(self)->size}; } #define cstr_new(literal) \ cstr_from_n(literal, c_strlen_lit(literal)) STC_INLINE cstr cstr_from(const char* str) @@ -115,7 +115,7 @@ STC_INLINE bool cstr_getline(cstr *self, FILE *stream) STC_INLINE cstr_buf cstr_buffer(cstr* s) { cstr_priv* p = _cstr_p(s); - return c_make(cstr_buf){s->str, p->size, p->cap}; + return c_init(cstr_buf){s->str, p->size, p->cap}; } STC_INLINE cstr cstr_with_capacity(const size_t cap) { diff --git a/include/stc/carc.h b/include/stc/carc.h index 4e03af9b..d8626e2d 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -100,7 +100,7 @@ _cx_deftypes(_c_carc_types, _cx_self, i_key); _cx_carc_rep { catomic_long counter; i_key value; }; STC_INLINE _cx_self _cx_memb(_init)(void) - { return c_make(_cx_self){NULL, NULL}; } + { return c_init(_cx_self){NULL, NULL}; } STC_INLINE long _cx_memb(_use_count)(const _cx_self* self) { return self->use_count ? *self->use_count : 0; } diff --git a/include/stc/carr2.h b/include/stc/carr2.h index ffedb07d..598a0e86 100644 --- a/include/stc/carr2.h +++ b/include/stc/carr2.h @@ -91,11 +91,11 @@ STC_INLINE size_t _cx_memb(_idx)(const _cx_self* self, size_t x, size_t y) { STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { size_t n = self->xdim*self->ydim; - return c_make(_cx_iter){n ? *self->data : NULL, *self->data + n}; + return c_init(_cx_iter){n ? *self->data : NULL, *self->data + n}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL, *self->data + self->xdim*self->ydim}; } + { return c_init(_cx_iter){NULL, *self->data + self->xdim*self->ydim}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { if (++it->ref == it->end) it->ref = NULL; } diff --git a/include/stc/carr3.h b/include/stc/carr3.h index 07eac2a1..a4b8e44b 100644 --- a/include/stc/carr3.h +++ b/include/stc/carr3.h @@ -94,11 +94,11 @@ STC_INLINE size_t _cx_memb(_idx)(const _cx_self* self, size_t x, size_t y, size_ STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { size_t n = _cx_memb(_size)(self); - return c_make(_cx_iter){n ? **self->data : NULL, **self->data + n}; + return c_init(_cx_iter){n ? **self->data : NULL, **self->data + n}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL, **self->data + _cx_memb(_size)(self)}; } + { return c_init(_cx_iter){NULL, **self->data + _cx_memb(_size)(self)}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { if (++it->ref == it->end) it->ref = NULL; } diff --git a/include/stc/cbits.h b/include/stc/cbits.h index fc45feef..6415c529 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 cbits cbits_init(void) { return c_init(cbits){NULL}; } 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 i_type _i_memb(_init)(void) { return c_init(i_type){0}; } 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; } diff --git a/include/stc/cbox.h b/include/stc/cbox.h index fb4452a4..b8934e46 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -85,13 +85,13 @@ _cx_deftypes(_c_cbox_types, _cx_self, i_key); // constructors (takes ownsership) STC_INLINE _cx_self _cx_memb(_init)(void) - { return c_make(_cx_self){NULL}; } + { return c_init(_cx_self){NULL}; } STC_INLINE long _cx_memb(_use_count)(const _cx_self* self) { return (long)(self->get != NULL); } STC_INLINE _cx_self _cx_memb(_from_ptr)(_cx_value* p) - { return c_make(_cx_self){p}; } + { return c_init(_cx_self){p}; } // c++: std::make_unique<i_key>(val) STC_INLINE _cx_self _cx_memb(_make)(_cx_value val) { diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index 8d1f236b..9395171f 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -73,13 +73,13 @@ #ifndef __cplusplus # define c_alloc(T) c_malloc(sizeof(T)) # define c_alloc_n(T, n) c_malloc(sizeof(T)*(n)) -# define c_make(T) (T) +# define c_init(T) (T) # define c_new(T, ...) ((T*)memcpy(c_alloc(T), (T[]){__VA_ARGS__}, sizeof(T))) #else # include <new> # define c_alloc(T) static_cast<T*>(c_malloc(sizeof(T))) # define c_alloc_n(T, n) static_cast<T*>(c_malloc(sizeof(T)*(n))) -# define c_make(T) T +# define c_init(T) T # define c_new(T, ...) new (c_alloc(T)) T(__VA_ARGS__) #endif #ifndef c_malloc @@ -122,8 +122,8 @@ typedef const char* crawstr; #define c_strlen_lit(literal) (sizeof "" literal - 1U) #define c_sv(...) c_MACRO_OVERLOAD(c_sv, __VA_ARGS__) -#define c_sv1(lit) (c_make(csview){lit, c_strlen_lit(lit)}) -#define c_sv2(str, n) (c_make(csview){str, n}) +#define c_sv1(lit) (c_init(csview){lit, c_strlen_lit(lit)}) +#define c_sv2(str, n) (c_init(csview){str, n}) #define c_PRIsv ".*s" #define c_ARGsv(sv) (int)(sv).size, (sv).str #define c_PAIR(ref) (ref)->first, (ref)->second diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h index 2b8513e1..302351ac 100644 --- a/include/stc/cdeq.h +++ b/include/stc/cdeq.h @@ -101,11 +101,11 @@ STC_INLINE void _cx_memb(_pop_front)(_cx_self* self) // == _pop() when _ STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { size_t n = cdeq_rep_(self)->size; - return c_make(_cx_iter){n ? self->data : NULL, self->data + n}; + return c_init(_cx_iter){n ? self->data : NULL, self->data + n}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL, self->data + cdeq_rep_(self)->size}; } + { return c_init(_cx_iter){NULL, self->data + cdeq_rep_(self)->size}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { if (++it->ref == it->end) it->ref = NULL; } @@ -216,7 +216,7 @@ static struct cdeq_rep _cdeq_sentinel = {0, 0}; STC_DEF _cx_self _cx_memb(_init)(void) { _cx_value *b = (_cx_value *) _cdeq_sentinel.base; - return c_make(_cx_self){b, b}; + return c_init(_cx_self){b, b}; } STC_DEF void @@ -366,7 +366,7 @@ _cx_memb(_insert_uninit)(_cx_self* self, _cx_value* pos, const size_t n) { r->size += n; pos = self->data + idx; } - return c_make(_cx_iter){pos, self->data + r->size}; + return c_init(_cx_iter){pos, self->data + r->size}; } STC_DEF _cx_value* @@ -399,7 +399,7 @@ _cx_memb(_erase_range_p)(_cx_self* self, _cx_value* p1, _cx_value* p2) { { i_keydrop(p); } memmove(p1, p2, (end - p2) * sizeof *p1); r->size -= len; - return c_make(_cx_iter){p2 == end ? NULL : p1, end - len}; + return c_init(_cx_iter){p2 == end ? NULL : p1, end - len}; } #if !defined _i_no_clone diff --git a/include/stc/clist.h b/include/stc/clist.h index b5939029..9c27f1ff 100644 --- a/include/stc/clist.h +++ b/include/stc/clist.h @@ -133,7 +133,7 @@ STC_INLINE _cx_value* _cx_memb(_emplace)(_cx_self* self, _cx_raw raw) { return _cx_memb(_push_back)(self, i_keyfrom(raw)); } #endif // !_i_no_emplace -STC_INLINE _cx_self _cx_memb(_init)(void) { return c_make(_cx_self){NULL}; } +STC_INLINE _cx_self _cx_memb(_init)(void) { return c_init(_cx_self){NULL}; } STC_INLINE bool _cx_memb(_reserve)(_cx_self* self, size_t n) { return true; } STC_INLINE bool _cx_memb(_empty)(const _cx_self* self) { return self->last == NULL; } STC_INLINE void _cx_memb(_clear)(_cx_self* self) { _cx_memb(_drop)(self); } @@ -155,12 +155,12 @@ _cx_memb(_count)(const _cx_self* self) { STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { _cx_value* head = self->last ? &self->last->next->value : NULL; - return c_make(_cx_iter){head, &self->last, self->last}; + return c_init(_cx_iter){head, &self->last, self->last}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL}; } + { return c_init(_cx_iter){NULL}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { diff --git a/include/stc/cmap.h b/include/stc/cmap.h index ed8a81c8..2cea2f54 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -99,7 +99,7 @@ STC_API chash_bucket_t _cx_memb(_bucket_)(const _cx_self* self, const _cx_rawke STC_API _cx_result _cx_memb(_insert_entry_)(_cx_self* self, _cx_rawkey rkey); STC_API void _cx_memb(_erase_entry)(_cx_self* self, _cx_value* val); -STC_INLINE _cx_self _cx_memb(_init)(void) { return c_make(_cx_self)_cmap_inits; } +STC_INLINE _cx_self _cx_memb(_init)(void) { return c_init(_cx_self)_cmap_inits; } STC_INLINE void _cx_memb(_shrink_to_fit)(_cx_self* self) { _cx_memb(_reserve)(self, self->size); } STC_INLINE void _cx_memb(_max_load_factor)(_cx_self* self, float ml) {self->max_load_factor = ml; } STC_INLINE bool _cx_memb(_empty)(const _cx_self* map) { return !map->size; } @@ -159,7 +159,7 @@ _cx_memb(_emplace)(_cx_self* self, _cx_rawkey rkey _i_MAP_ONLY(, i_valraw rmappe STC_INLINE _cx_raw _cx_memb(_value_toraw)(const _cx_value* val) { return _i_SET_ONLY( i_keyto(val) ) - _i_MAP_ONLY( c_make(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} ); + _i_MAP_ONLY( c_init(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} ); } STC_INLINE void @@ -200,7 +200,7 @@ _cx_memb(_begin)(const _cx_self* self) { STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL}; } + { return c_init(_cx_iter){NULL}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { @@ -218,7 +218,7 @@ STC_INLINE _cx_iter _cx_memb(_find)(const _cx_self* self, _cx_rawkey rkey) { i_size idx; if (self->size && self->_hashx[idx = _cx_memb(_bucket_)(self, &rkey).idx]) - return c_make(_cx_iter){self->table + idx, + return c_init(_cx_iter){self->table + idx, self->table + self->bucket_count, self->_hashx + idx}; return _cx_memb(_end)(self); diff --git a/include/stc/cpque.h b/include/stc/cpque.h index 532bf710..19b01c15 100644 --- a/include/stc/cpque.h +++ b/include/stc/cpque.h @@ -43,7 +43,7 @@ STC_API void _cx_memb(_erase_at)(_cx_self* self, size_t idx); STC_API void _cx_memb(_push)(_cx_self* self, _cx_value value); STC_INLINE _cx_self _cx_memb(_init)(void) - { return c_make(_cx_self){NULL}; } + { return c_init(_cx_self){NULL}; } STC_INLINE bool _cx_memb(_reserve)(_cx_self* self, const size_t cap) { if (cap != self->_len && cap <= self->_cap) return true; diff --git a/include/stc/crandom.h b/include/stc/crandom.h index 49f6d3ae..b46c0430 100644 --- a/include/stc/crandom.h +++ b/include/stc/crandom.h @@ -100,12 +100,12 @@ STC_INLINE double stc64_uniformf(stc64_t* rng, stc64_uniformf_t* dist) { /* Init uniform distributed float64 RNG, range [low, high). */ STC_INLINE stc64_uniformf_t stc64_uniformf_new(double low, double high) { - return c_make(stc64_uniformf_t){low, high - low}; + return c_init(stc64_uniformf_t){low, high - low}; } /* Marsaglia polar method for gaussian/normal distribution, float64. */ STC_INLINE stc64_normalf_t stc64_normalf_new(double mean, double stddev) { - return c_make(stc64_normalf_t){mean, stddev, 0.0, 0}; + return c_init(stc64_normalf_t){mean, stddev, 0.0, 0}; } /* -------------------------- IMPLEMENTATION ------------------------- */ diff --git a/include/stc/csmap.h b/include/stc/csmap.h index 35830626..68e96726 100644 --- a/include/stc/csmap.h +++ b/include/stc/csmap.h @@ -144,7 +144,7 @@ _cx_memb(_clear)(_cx_self* self) STC_INLINE _cx_raw _cx_memb(_value_toraw)(const _cx_value* val) { return _i_SET_ONLY( i_keyto(val) ) - _i_MAP_ONLY( c_make(_cx_raw){i_keyto((&val->first)), + _i_MAP_ONLY( c_init(_cx_raw){i_keyto((&val->first)), i_valto((&val->second))} ); } diff --git a/include/stc/cstack.h b/include/stc/cstack.h index 2f9b2626..2b5528e9 100644 --- a/include/stc/cstack.h +++ b/include/stc/cstack.h @@ -170,12 +170,12 @@ STC_INLINE i_keyraw _cx_memb(_value_toraw)(const _cx_value* val) #endif // !_i_no_clone STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { - return c_make(_cx_iter){self->_len ? (_cx_value*)self->data : NULL, + return c_init(_cx_iter){self->_len ? (_cx_value*)self->data : NULL, (_cx_value*)self->data + self->_len}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL, (_cx_value*)self->data + self->_len}; } + { return c_init(_cx_iter){NULL, (_cx_value*)self->data + self->_len}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { if (++it->ref == it->end) it->ref = NULL; } diff --git a/include/stc/cstr.h b/include/stc/cstr.h index fb748a53..3605bab8 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -72,7 +72,7 @@ STC_API char* _cstr_internal_move(cstr* self, size_t pos1, size_t pos2); #define cstr_new(literal) cstr_from_n(literal, c_strlen_lit(literal)) #define cstr_npos (SIZE_MAX >> 1) -#define cstr_null (c_make(cstr){{{0}}}) +#define cstr_null (c_init(cstr){{{0}}}) #define cstr_toraw(self) cstr_str(self) STC_API char* cstr_reserve(cstr* self, size_t cap); @@ -92,12 +92,12 @@ STC_API cstr cstr_replace_sv(csview sv, csview search, csview repl, unsigned STC_INLINE cstr_buf cstr_buffer(cstr* s) { return cstr_is_long(s) - ? c_make(cstr_buf){s->lon.data, cstr_l_size(s), cstr_l_cap(s)} - : c_make(cstr_buf){s->sml.data, cstr_s_size(s), cstr_s_cap}; + ? c_init(cstr_buf){s->lon.data, cstr_l_size(s), cstr_l_cap(s)} + : c_init(cstr_buf){s->sml.data, cstr_s_size(s), cstr_s_cap}; } STC_INLINE csview cstr_sv(const cstr* s) { - return cstr_is_long(s) ? c_make(csview){s->lon.data, cstr_l_size(s)} - : c_make(csview){s->sml.data, cstr_s_size(s)}; + return cstr_is_long(s) ? c_init(csview){s->lon.data, cstr_l_size(s)} + : c_init(csview){s->sml.data, cstr_s_size(s)}; } STC_INLINE cstr cstr_init(void) @@ -224,11 +224,11 @@ STC_INLINE csview cstr_u8_chr(const cstr* self, size_t u8idx) { STC_INLINE cstr_iter cstr_begin(const cstr* self) { csview sv = cstr_sv(self); - if (!sv.size) return c_make(cstr_iter){NULL}; - return c_make(cstr_iter){.u8 = {{sv.str, utf8_chr_size(sv.str)}}}; + if (!sv.size) return c_init(cstr_iter){NULL}; + return c_init(cstr_iter){.u8 = {{sv.str, utf8_chr_size(sv.str)}}}; } STC_INLINE cstr_iter cstr_end(const cstr* self) { - return c_make(cstr_iter){NULL}; + return c_init(cstr_iter){NULL}; } STC_INLINE void cstr_next(cstr_iter* it) { it->ref += it->u8.chr.size; diff --git a/include/stc/csview.h b/include/stc/csview.h index 3d8bd044..566534cc 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -36,7 +36,7 @@ #define csview_from_n c_sv STC_INLINE csview csview_from(const char* str) - { return c_make(csview){str, strlen(str)}; } + { return c_init(csview){str, strlen(str)}; } STC_INLINE void csview_clear(csview* self) { *self = csview_null; } STC_INLINE size_t csview_size(csview sv) { return sv.size; } @@ -74,12 +74,12 @@ STC_INLINE csview csview_slice(csview sv, size_t p1, size_t p2) { /* utf8 iterator */ STC_INLINE csview_iter csview_begin(const csview* self) { - if (!self->size) return c_make(csview_iter){NULL}; - return c_make(csview_iter){.u8 = {{self->str, utf8_chr_size(self->str)}, + if (!self->size) return c_init(csview_iter){NULL}; + return c_init(csview_iter){.u8 = {{self->str, utf8_chr_size(self->str)}, self->str + self->size}}; } STC_INLINE csview_iter csview_end(const csview* self) { - return c_make(csview_iter){.u8 = {{NULL}, self->str + self->size}}; + return c_init(csview_iter){.u8 = {{NULL}, self->str + self->size}}; } STC_INLINE void csview_next(csview_iter* it) { it->ref += it->u8.chr.size; diff --git a/include/stc/cvec.h b/include/stc/cvec.h index aeb17e1a..f0ad0a80 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -198,11 +198,11 @@ _cx_memb(_at_mut)(_cx_self* self, const size_t idx) { STC_INLINE _cx_iter _cx_memb(_begin)(const _cx_self* self) { size_t n = cvec_rep_(self)->size; - return c_make(_cx_iter){n ? self->data : NULL, self->data + n}; + return c_init(_cx_iter){n ? self->data : NULL, self->data + n}; } STC_INLINE _cx_iter _cx_memb(_end)(const _cx_self* self) - { return c_make(_cx_iter){NULL, self->data + cvec_rep_(self)->size}; } + { return c_init(_cx_iter){NULL, self->data + cvec_rep_(self)->size}; } STC_INLINE void _cx_memb(_next)(_cx_iter* it) { if (++it->ref == it->end) it->ref = NULL; } @@ -345,7 +345,7 @@ _cx_memb(_insert_uninit)(_cx_self* self, _cx_value* pos, const size_t n) { memmove(pos + n, pos, (r->size - idx)*sizeof *pos); r->size += n; } - return c_make(_cx_iter){pos, self->data + r->size}; + return c_init(_cx_iter){pos, self->data + r->size}; } STC_DEF _cx_iter @@ -367,7 +367,7 @@ _cx_memb(_erase_range_p)(_cx_self* self, _cx_value* p1, _cx_value* p2) { { i_keydrop(p); } memmove(p1, p2, (end - p2) * sizeof *p1); r->size -= len; - return c_make(_cx_iter){p2 == end ? NULL : p1, end - len}; + return c_init(_cx_iter){p2 == end ? NULL : p1, end - len}; } #if !defined _i_no_clone |
