diff options
| author | Tyge Løvset <[email protected]> | 2022-05-24 11:32:12 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-05-24 11:32:12 +0200 |
| commit | 966100106830f990bc3e1b40a5b5c39b64d5e9b0 (patch) | |
| tree | 3704a5317fedd54f86a95163c6f498c27f6f209f /examples/city.c | |
| parent | 99bfc38c2517f1ee20db3d9553be177ae6c960c6 (diff) | |
| download | STC-modified-966100106830f990bc3e1b40a5b5c39b64d5e9b0.tar.gz STC-modified-966100106830f990bc3e1b40a5b5c39b64d5e9b0.zip | |
Changed c_forpair(k, v, Map, map) so that k and v are pointers instead of values. This to make it consistent with c_foreach, c_apply, c_apply_arr.
Diffstat (limited to 'examples/city.c')
| -rw-r--r-- | examples/city.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/city.c b/examples/city.c index 017c1c20..fb863e3c 100644 --- a/examples/city.c +++ b/examples/city.c @@ -75,7 +75,8 @@ int main(void) printf("\nMap:\n");
c_forpair (id, city, CityMap, map)
- printf("id:%d, city:%s, %d, use:%ld\n", _.id, cstr_str(&_.city.get->name), _.city.get->population, CityArc_use_count(_.city));
+ printf("id:%d, city:%s, %d, use:%ld\n", *_.id, cstr_str(&_.city->get->name),
+ _.city->get->population, CityArc_use_count(*_.city));
puts("");
}
}
|
