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 /README.md | |
| 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 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -33,7 +33,7 @@ int main(void) { cvec_i_push_back(&vec, 1);
cvec_i_push_back(&vec, 2);
c_foreach (i, cvec_i, vec)
- printf(" %d", *i.val);
+ printf(" %d", *i.ref);
cvec_i_del(&vec);
}
```
@@ -59,7 +59,7 @@ int main(void) { cvec_u_push_back(&vec, (User) {cstr_from("admin"), 0}); // cstr_from() allocates string memory
cvec_u_push_back(&vec, (User) {cstr_from("usera"), 1});
c_foreach (i, cvec_u, vec)
- printf("%s: %d\n", i.val->name.str, i.val->id);
+ printf("%s: %d\n", i.ref->name.str, i.ref->id);
cvec_u_del(&vec); // free everything
}
```
|
