summaryrefslogtreecommitdiffhomepage
path: root/examples/mapmap.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-04-18 00:44:51 +0200
committerTyge Løvset <[email protected]>2022-04-18 00:44:51 +0200
commit00804d9ff488f63468a0bb528c7b807aea7c3ea3 (patch)
tree51b47787adc853bd1a10ec820a6ef5c184fa2498 /examples/mapmap.c
parent4436a1c0ac37dc2e73a2134d5ad85c010340b35d (diff)
downloadSTC-modified-00804d9ff488f63468a0bb528c7b807aea7c3ea3.tar.gz
STC-modified-00804d9ff488f63468a0bb528c7b807aea7c3ea3.zip
Converted all example to use cstr_str(&s) instead of s.str to allow SSO string. Fixed misc warnings.
Diffstat (limited to 'examples/mapmap.c')
-rw-r--r--examples/mapmap.c4
1 files changed, 2 insertions, 2 deletions
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 <stc/csmap.h>
#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"));