summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cpque.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-07 12:30:39 +0100
committerTyge Løvset <[email protected]>2023-02-07 12:30:39 +0100
commitca54204557669fb54f43959594ee92109fcc75b6 (patch)
tree9880ad3d7e3dca7e309e0b96f5c88ebbb0552853 /include/stc/cpque.h
parent3cb564e7274b7749531742fa7c50fd928fdbe2d9 (diff)
downloadSTC-modified-ca54204557669fb54f43959594ee92109fcc75b6.tar.gz
STC-modified-ca54204557669fb54f43959594ee92109fcc75b6.zip
Added custom allocator per container type.
Diffstat (limited to 'include/stc/cpque.h')
-rw-r--r--include/stc/cpque.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cpque.h b/include/stc/cpque.h
index 55df70ef..4955f2e0 100644
--- a/include/stc/cpque.h
+++ b/include/stc/cpque.h
@@ -55,7 +55,7 @@ STC_INLINE _cx_self _cx_memb(_from_n)(const _cx_raw* raw, intptr_t n)
STC_INLINE bool _cx_memb(_reserve)(_cx_self* self, const intptr_t cap) {
if (cap != self->_len && cap <= self->_cap) return true;
- _cx_value *d = (_cx_value *)c_realloc(self->data, cap*c_sizeof *d);
+ _cx_value *d = (_cx_value *)i_realloc(self->data, cap*c_sizeof *d);
return d ? (self->data = d, self->_cap = cap, true) : false;
}
@@ -79,7 +79,7 @@ STC_INLINE void _cx_memb(_clear)(_cx_self* self) {
}
STC_INLINE void _cx_memb(_drop)(_cx_self* self)
- { _cx_memb(_clear)(self); c_free(self->data); }
+ { _cx_memb(_clear)(self); i_free(self->data); }
STC_INLINE intptr_t _cx_memb(_size)(const _cx_self* q)
{ return q->_len; }