diff options
| author | Tyge Løvset <[email protected]> | 2022-04-17 21:46:41 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-04-17 21:46:41 +0200 |
| commit | 4436a1c0ac37dc2e73a2134d5ad85c010340b35d (patch) | |
| tree | 21547655a7131d5961ba96513772b8a8dd3b8460 /include/stc/carc.h | |
| parent | 57de677b5b00e0aa75772d6b5fe6347edbe03ffd (diff) | |
| download | STC-modified-4436a1c0ac37dc2e73a2134d5ad85c010340b35d.tar.gz STC-modified-4436a1c0ac37dc2e73a2134d5ad85c010340b35d.zip | |
alt/cstr.h (sso string): added cstr_replace_all(). Header examples updated to use cstr_str(&s) instead of s.str. Some docs updates.
Diffstat (limited to 'include/stc/carc.h')
| -rw-r--r-- | include/stc/carc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/carc.h b/include/stc/carc.h index de78fe3b..374044f3 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -30,7 +30,7 @@ Person Person_new(const char* name, const char* last) { return (Person){.name = cstr_from(name), .last = cstr_from(last)};
}
void Person_drop(Person* p) {
- printf("drop: %s %s\n", p->name.str, p->last.str);
+ printf("drop: %s %s\n", cstr_str(&p->name), cstr_str(&p->last));
c_drop(cstr, &p->name, &p->last);
}
@@ -43,7 +43,7 @@ int main() { carc_person p = carc_person_from(Person_new("John", "Smiths"));
carc_person q = carc_person_clone(p); // share the pointer
- printf("%s %s. uses: %" PRIuMAX "\n", q.get->name.str, q.get->last.str, *q.use_count);
+ printf("%s %s. uses: %" PRIuMAX "\n", cstr_str(&q.get->name), cstr_str(&q.get->last), *q.use_count);
c_drop(carc_person, &p, &q);
}
*/
|
