diff options
| author | Tyge Løvset <[email protected]> | 2020-09-15 22:43:41 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-09-15 22:43:41 +0200 |
| commit | f4435af2fc9e9187f7be0149c2eb916db27cb257 (patch) | |
| tree | 117429619290d165b7a3001f21f3c0e7f37a1045 /examples/mapmap.c | |
| parent | f539099575e14aea9f2e043b9af33d05c47399ad (diff) | |
| download | STC-modified-f4435af2fc9e9187f7be0149c2eb916db27cb257.tar.gz STC-modified-f4435af2fc9e9187f7be0149c2eb916db27cb257.zip | |
New API Change.
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 f3df9609..4e71f6c0 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -3,8 +3,8 @@ #include <stc/cmap.h>
#include <stc/cstr.h>
-declare_cmap_str();
-declare_cmap_strkey(cfg, cmap_str, cmap_str_destroy);
+cdef_cmap_str();
+cdef_cmap_strkey(cfg, cmap_str, cmap_str_destroy);
int main(void) {
cmap_cfg config = cmap_ini;
@@ -19,8 +19,8 @@ int main(void) { cmap_str_put(&cmap_cfg_emplace(&config, "group", init).first->value, "proj2", "Wind"); // Update
c_foreach (i, cmap_cfg, config)
- c_foreach (j, cmap_str, i.item->value)
- printf("%s: %s - %s (%u)\n", i.item->key.str, j.item->key.str, j.item->value.str, i.item->value.bucket_count);
+ c_foreach (j, cmap_str, i.get->value)
+ printf("%s: %s - %s (%u)\n", i.get->key.str, j.get->key.str, j.get->value.str, i.get->value.bucket_count);
cmap_cfg_destroy(&config);
}
\ No newline at end of file |
