From 00804d9ff488f63468a0bb528c7b807aea7c3ea3 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 18 Apr 2022 00:44:51 +0200 Subject: Converted all example to use cstr_str(&s) instead of s.str to allow SSO string. Fixed misc warnings. --- examples/mapmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/mapmap.c') diff --git a/examples/mapmap.c b/examples/mapmap.c index 0d6d2843..7faaffd1 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -3,7 +3,7 @@ #define i_type People #define i_key_str #define i_val_str -#define i_keydrop(p) (printf("kdrop: %s\n", p->str), cstr_drop(p)) +#define i_keydrop(p) (printf("kdrop: %s\n", cstr_str(p)), cstr_drop(p)) #include #define i_type Departments @@ -55,7 +55,7 @@ int main(void) c_foreach (i, Departments, map) c_forpair (name, email, People, i.ref->second) - printf("%s: %s - %s\n", i.ref->first.str, _.name.str, _.email.str); + printf("%s: %s - %s\n", cstr_str(&i.ref->first), cstr_str(&_.name), cstr_str(&_.email)); puts(""); printf("found: %d\n", contains(&map, "Nick Denton")); -- cgit v1.2.3