summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/cbox.h')
-rw-r--r--include/stc/cbox.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h
index b8a61375..7be3dc36 100644
--- a/include/stc/cbox.h
+++ b/include/stc/cbox.h
@@ -37,7 +37,7 @@ Person Person_clone(Person p) {
}
void Person_drop(Person* p) {
printf("drop: %s %s\n", cstr_str(&p->name), cstr_str(&p->email));
- c_drop(cstr, &p->name, &p->email);
+ c_DROP(cstr, &p->name, &p->email);
}
#define i_keyclass Person // bind Person clone+drop fn's
@@ -45,7 +45,7 @@ void Person_drop(Person* p) {
#include <stc/cbox.h>
int main() {
- c_auto (PBox, p, q)
+ c_AUTO (PBox, p, q)
{
p = PBox_from(Person_from("John Smiths", "[email protected]"));
q = PBox_clone(p);
@@ -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 = {c_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);
+ c_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 = {c_ALLOC(i_key)};
*out.get = i_keyclone(*other.get);
return out;
}