diff options
Diffstat (limited to 'include/stc/cmap.h')
| -rw-r--r-- | include/stc/cmap.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h index 49d7d159..f9cd6986 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -312,8 +312,8 @@ STC_INLINE void _cx_memb(_wipe_)(_cx_self* self) { STC_DEF void _cx_memb(_drop)(_cx_self* self) { _cx_memb(_wipe_)(self); - c_FREE(self->_hashx); - c_FREE((void *) self->table); + c_free(self->_hashx); + c_free((void *) self->table); } STC_DEF void _cx_memb(_clear)(_cx_self* self) { @@ -390,9 +390,9 @@ STC_DEF _cx_self _cx_memb(_clone)(_cx_self m) { if (m.table) { _cx_value *t = c_ALLOC_N(_cx_value, m.bucket_count), *dst = t, *m_end = m.table + m.bucket_count; - uint8_t *h = (uint8_t *)memcpy(c_MALLOC(m.bucket_count + 1), m._hashx, m.bucket_count + 1); + uint8_t *h = (uint8_t *)memcpy(c_malloc(m.bucket_count + 1), m._hashx, m.bucket_count + 1); if (!(t && h)) - { c_FREE(t), c_FREE(h), t = 0, h = 0, m.bucket_count = 0; } + { c_free(t), c_free(h), t = 0, h = 0, m.bucket_count = 0; } else for (; m.table != m_end; ++m.table, ++m._hashx, ++dst) if (*m._hashx) @@ -416,7 +416,7 @@ _cx_memb(_reserve)(_cx_self* self, const size_t _newcap) { #endif _cx_self m = { c_ALLOC_N(_cx_value, _nbuckets), - (uint8_t *) c_CALLOC(_nbuckets + 1, 1), + (uint8_t *) c_calloc(_nbuckets + 1, 1), self->size, (i_size)_nbuckets, }; bool ok = m.table && m._hashx; @@ -432,8 +432,8 @@ _cx_memb(_reserve)(_cx_self* self, const size_t _newcap) { } c_swap(_cx_self, self, &m); } - c_FREE(m._hashx); - c_FREE(m.table); + c_free(m._hashx); + c_free(m.table); return ok; } |
