diff options
| author | Tyge Løvset <[email protected]> | 2021-12-22 08:49:19 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-22 08:50:15 +0100 |
| commit | 6e65e30c6e3c2bc271d3885e749ceb0289bbd9cf (patch) | |
| tree | ccffa7b7dde19fb551f99c7eed529bdc7308e494 /examples/csmap_insert.c | |
| parent | 1b90b6c3eea0f3e07f8a2d2abe3686917d1d86a8 (diff) | |
| download | STC-modified-6e65e30c6e3c2bc271d3885e749ceb0289bbd9cf.tar.gz STC-modified-6e65e30c6e3c2bc271d3885e749ceb0289bbd9cf.zip | |
Changed the c_apply() and c_apply_pair() to one new c_apply() API. Added c_pair(v) for convenience.
Diffstat (limited to 'examples/csmap_insert.c')
| -rw-r--r-- | examples/csmap_insert.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/csmap_insert.c b/examples/csmap_insert.c index c3690c83..1b89915e 100644 --- a/examples/csmap_insert.c +++ b/examples/csmap_insert.c @@ -99,7 +99,8 @@ int main() c_auto (csmap_ii, m4) {
// Insert the elements from an initializer_list
- c_apply_pair(csmap_ii, insert, &m4, { { 4, 44 }, { 2, 22 }, { 3, 33 }, { 1, 11 }, { 5, 55 } });
+ c_apply(v, csmap_ii_insert(&m4, c_pair(v)), csmap_ii_rawvalue,
+ { { 4, 44 }, { 2, 22 }, { 3, 33 }, { 1, 11 }, { 5, 55 } });
puts("After initializer_list insertion, m4 contains:");
print_ii(m4);
puts("");
|
