diff options
| author | Tyge Løvset <[email protected]> | 2021-09-13 14:52:05 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-09-13 14:52:05 +0200 |
| commit | 8e2e792b2c3e1fa04a0ac67ea7d9010939ca8009 (patch) | |
| tree | 2120c1001aafed85f6da623ed33628b89755a816 /examples/mapmap.c | |
| parent | c8df06eba131d607660af4381d0d800d639f6279 (diff) | |
| download | STC-modified-8e2e792b2c3e1fa04a0ac67ea7d9010939ca8009.tar.gz STC-modified-8e2e792b2c3e1fa04a0ac67ea7d9010939ca8009.zip | |
Removed most of the case-insensitive cstr methods, as they won't work with utf-8.
Diffstat (limited to 'examples/mapmap.c')
| -rw-r--r-- | examples/mapmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/mapmap.c b/examples/mapmap.c index b7dd8afb..b158b96a 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -18,10 +18,9 @@ int main(void) {
c_forauto (cmap_cfg, cfg)
{
- cmap_str init = cmap_str_init();
- cmap_cfg_insert(&cfg, cstr_from("user"), init);
- cmap_cfg_insert(&cfg, cstr_from("group"), init);
- cmap_cfg_insert(&cfg, cstr_from("admin"), init);
+ cmap_cfg_insert(&cfg, cstr_from("user"), cmap_str_init());
+ cmap_cfg_insert(&cfg, cstr_from("group"), cmap_str_init());
+ cmap_cfg_insert(&cfg, cstr_from("admin"), cmap_str_init());
cmap_str_emplace(cmap_cfg_at(&cfg, "user"), "name", "Joe");
cmap_str_emplace(cmap_cfg_at(&cfg, "user"), "groups", "proj1,proj3");
@@ -34,6 +33,7 @@ int main(void) c_foreach (i, cmap_cfg, cfg)
c_foreach (j, cmap_str, i.ref->second)
- printf("%s: %s - %s (%u)\n", i.ref->first.str, j.ref->first.str, j.ref->second.str, i.ref->second.bucket_count);
+ printf("%s: %s - %s (%u)\n", i.ref->first.str, j.ref->first.str, j.ref->second.str,
+ i.ref->second.bucket_count);
}
}
\ No newline at end of file |
