summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbox.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/cbox.h
parent3cb564e7274b7749531742fa7c50fd928fdbe2d9 (diff)
downloadSTC-modified-ca54204557669fb54f43959594ee92109fcc75b6.tar.gz
STC-modified-ca54204557669fb54f43959594ee92109fcc75b6.zip
Added custom allocator per container type.
Diffstat (limited to 'include/stc/cbox.h')
-rw-r--r--include/stc/cbox.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h
index 4f0a2976..c914152c 100644
--- a/include/stc/cbox.h
+++ b/include/stc/cbox.h
@@ -89,7 +89,7 @@ STC_INLINE _cx_self _cx_memb(_from_ptr)(_cx_value* p)
// c++: std::make_unique<i_key>(val)
STC_INLINE _cx_self _cx_memb(_make)(_cx_value val) {
- _cx_self ptr = {c_ALLOC(_cx_value)};
+ _cx_self ptr = {_i_alloc(_cx_value)};
*ptr.get = val; return ptr;
}
@@ -100,7 +100,7 @@ STC_INLINE _cx_raw _cx_memb(_toraw)(const _cx_self* self)
STC_INLINE void _cx_memb(_drop)(_cx_self* self) {
if (self->get) {
i_keydrop(self->get);
- c_free(self->get);
+ i_free(self->get);
}
}
@@ -136,7 +136,7 @@ STC_INLINE _cx_self _cx_memb(_from)(_cx_value val)
STC_INLINE _cx_self _cx_memb(_clone)(_cx_self other) {
if (!other.get)
return other;
- _cx_self out = {c_ALLOC(i_key)};
+ _cx_self out = {_i_alloc(i_key)};
*out.get = i_keyclone((*other.get));
return out;
}