diff options
| author | Tyge Løvset <[email protected]> | 2020-09-18 11:55:29 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-09-18 11:55:29 +0200 |
| commit | 681873e4cb6ea076b79c6c70b2df2ba4e4c19bda (patch) | |
| tree | 69c0c3290189163937d4ab4203fe4565094657b0 /examples/mapmap.c | |
| parent | 692ab82818e2d65177e06d7717d9184b7bc27ff1 (diff) | |
| download | STC-modified-681873e4cb6ea076b79c6c70b2df2ba4e4c19bda.tar.gz STC-modified-681873e4cb6ea076b79c6c70b2df2ba4e4c19bda.zip | |
Changed <container>_ini macro constant to <container>_INIT, and <container>_destroy() to <container>_del.
Diffstat (limited to 'examples/mapmap.c')
| -rw-r--r-- | examples/mapmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/mapmap.c b/examples/mapmap.c index 57bcf384..38e88712 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -4,11 +4,11 @@ #include <stc/cstr.h>
using_cmap_str();
-using_cmap_strkey(cfg, cmap_str, cmap_str_destroy);
+using_cmap_strkey(cfg, cmap_str, cmap_str_del);
int main(void) {
- cmap_cfg config = cmap_ini;
- cmap_str init = cmap_ini;
+ cmap_cfg config = cmap_INIT;
+ cmap_str init = cmap_INIT;
cmap_str_put(&cmap_cfg_emplace(&config, "user", init).first->second, "name", "Joe");
cmap_str_put(&cmap_cfg_emplace(&config, "user", init).first->second, "groups", "proj1,proj3");
cmap_str_put(&cmap_cfg_emplace(&config, "group", init).first->second, "proj1", "Energy");
@@ -22,5 +22,5 @@ int main(void) { c_foreach (j, cmap_str, i.get->second)
printf("%s: %s - %s (%u)\n", i.get->first.str, j.get->first.str, j.get->second.str, i.get->second.bucket_count);
- cmap_cfg_destroy(&config);
+ cmap_cfg_del(&config);
}
\ No newline at end of file |
