summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbox.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-31 09:41:24 +0100
committerTyge Løvset <[email protected]>2022-12-31 09:41:24 +0100
commit91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69 (patch)
treeb2f1eb8fef010ec490efcf0fb420b218ad23a4dd /include/stc/cbox.h
parent89de800ff2e0a8389359a8a7a2684edaae8ce742 (diff)
downloadSTC-modified-91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69.tar.gz
STC-modified-91e79fc60713c1f09e940a7ee83ff2f8aa4f9d69.zip
Internally renamed ccommon.h macros to uppercase. Lowercase macros are still supported via include/stc/priv/lowcase.h.
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;
}