diff options
| author | Tyge Løvset <[email protected]> | 2020-12-17 07:55:59 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-12-17 07:55:59 +0100 |
| commit | bc2981ee8fa3cba0be0d0efb1e2a2072c98ca5a0 (patch) | |
| tree | 2e848e43a77cf4507645d7b89231c9a726b3ec05 /examples/words.c | |
| parent | 214a2aa75d164d285661719131f54c71fa2f8e37 (diff) | |
| download | STC-modified-bc2981ee8fa3cba0be0d0efb1e2a2072c98ca5a0.tar.gz STC-modified-bc2981ee8fa3cba0be0d0efb1e2a2072c98ca5a0.zip | |
API change: Reverted back to original name used for .val in iterators to .ref
Diffstat (limited to 'examples/words.c')
| -rw-r--r-- | examples/words.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/words.c b/examples/words.c index 7017cebb..7e80c452 100644 --- a/examples/words.c +++ b/examples/words.c @@ -18,7 +18,7 @@ int main1() }); clist_str_push_back(&lwords, cstr_from_fmt("%f", 123897.0 / 23.0)); c_foreach (w, clist_str, lwords) - printf("%s\n", w.val->str); + printf("%s\n", w.ref->str); puts(""); cvec_str words = cvec_inits; @@ -29,10 +29,10 @@ int main1() cmap_si word_map = cmap_inits; c_foreach (w, cvec_str, words) - cmap_si_emplace(&word_map, w.val->str, 0).first->second += 1; + cmap_si_emplace(&word_map, w.ref->str, 0).first->second += 1; c_foreach (i, cmap_si, word_map) { - printf("%d occurrences of word '%s'\n", i.val->second, i.val->first.str); + printf("%d occurrences of word '%s'\n", i.ref->second, i.ref->first.str); } cmap_si_del(&word_map); |
