diff options
| author | Tyge Løvset <[email protected]> | 2022-04-27 19:46:01 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-04-27 19:46:01 +0200 |
| commit | 163831695b2ad211fc31ffb7410a82cd66a425e9 (patch) | |
| tree | 9b2fdeba17944eadf267d7a770124599674f43bd /include | |
| parent | edfcc712b48e2a582bcad1bc5a4102f18154e549 (diff) | |
| download | STC-modified-163831695b2ad211fc31ffb7410a82cd66a425e9.tar.gz STC-modified-163831695b2ad211fc31ffb7410a82cd66a425e9.zip | |
Docs only update for carc/cbox.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/carc.h | 3 | ||||
| -rw-r--r-- | include/stc/cbox.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h index c7c18f53..031c4f56 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -37,10 +37,11 @@ void Person_drop(Person* p) { #define i_tag person
#define i_key Person
#define i_keydrop Person_drop
+#define i_opt c_no_cmp
#include <stc/carc.h>
int main() {
- carc_person p = carc_person_from(Person_new("John", "Smiths"));
+ carc_person p = carc_person_make(Person_new("John", "Smiths"));
carc_person q = carc_person_clone(p); // share the pointer
printf("%s %s. uses: %" PRIuMAX "\n", cstr_str(&q.get->name), cstr_str(&q.get->last), *q.use_count);
diff --git a/include/stc/cbox.h b/include/stc/cbox.h index f34888e8..b4b583fa 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -48,7 +48,7 @@ void Person_drop(Person* p) { int main() {
c_auto (PBox, p, q)
{
- p = PBox_from(Person_from("John Smiths", "[email protected]"));
+ p = PBox_make(Person_from("John Smiths", "[email protected]"));
q = PBox_clone(p);
cstr_assign(&q.get->name, "Joe Smiths");
|
