diff options
| author | Tyge Løvset <[email protected]> | 2023-01-19 21:20:16 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-19 21:20:16 +0100 |
| commit | f8accdbcee0b397ad6ba2f2c2c64575a003e71e5 (patch) | |
| tree | 1ec8e47eb15fd69d53e394e143c36d7f3500643e /include/stc/cbox.h | |
| parent | 5aa48d538569463ffeda976d21f79edc5f276be4 (diff) | |
| download | STC-modified-f8accdbcee0b397ad6ba2f2c2c64575a003e71e5.tar.gz STC-modified-f8accdbcee0b397ad6ba2f2c2c64575a003e71e5.zip | |
Finish last commit. Most safe function macros are now preferred lowercase, whereas flow control macros (c_FOREACH, ..) are preferred uppercase.
Diffstat (limited to 'include/stc/cbox.h')
| -rw-r--r-- | include/stc/cbox.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h index 95dfdf8f..6dc41ed1 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 @@ -79,13 +79,13 @@ _cx_deftypes(_c_cbox_types, _cx_self, i_key); // constructors (take ownership) STC_INLINE _cx_self _cx_memb(_init)(void) - { return c_INIT(_cx_self){NULL}; } + { return c_COMPOUND(_cx_self){NULL}; } STC_INLINE long _cx_memb(_use_count)(const _cx_self* self) { return (long)(self->get != NULL); } STC_INLINE _cx_self _cx_memb(_from_ptr)(_cx_value* p) - { return c_INIT(_cx_self){p}; } + { return c_COMPOUND(_cx_self){p}; } // c++: std::make_unique<i_key>(val) STC_INLINE _cx_self _cx_memb(_make)(_cx_value val) { |
