summaryrefslogtreecommitdiffhomepage
path: root/docs/cset_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-17 07:55:59 +0100
committerTyge Løvset <[email protected]>2020-12-17 07:55:59 +0100
commitbc2981ee8fa3cba0be0d0efb1e2a2072c98ca5a0 (patch)
tree2e848e43a77cf4507645d7b89231c9a726b3ec05 /docs/cset_api.md
parent214a2aa75d164d285661719131f54c71fa2f8e37 (diff)
downloadSTC-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 'docs/cset_api.md')
-rw-r--r--docs/cset_api.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/cset_api.md b/docs/cset_api.md
index 3e63f383..223dd1cf 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -32,7 +32,7 @@ be replaced by `my` in all of the following documentation.
| `cset_X_value_t` | `Key` | The value type |
| `cset_X_result_t` | `struct { Key first; bool second; }` | Result of insert/emplace |
| `cset_X_input_t` | `cset_X_rawkey_t` | The input type (rawkey) |
-| `cset_X_iter_t` | `struct { cset_X_value_t *val; ... }` | Iterator type |
+| `cset_X_iter_t` | `struct { cset_X_value_t *ref; ... }` | Iterator type |
## Constants and macros
@@ -42,7 +42,7 @@ be replaced by `my` in all of the following documentation.
| `cset_empty(set)` | Test for empty set |
| `cset_size(set)` | Get set size |
| `cset_capacity(set)` | Get set capacity |
-| `c_try_emplace(self, ctype, key, val)` | Emplace if key exist |
+| `c_try_emplace(self, ctype, key, ref)` | Emplace if key exist |
## Header file
@@ -110,13 +110,13 @@ int main ()
cset_str_emplace(&fourth, "flour");
cset_str fifth = cset_inits;
- c_foreach (x, cset_str, second) cset_str_emplace(&fifth, x.val->str);
- c_foreach (x, cset_str, third) cset_str_emplace(&fifth, x.val->str);
- c_foreach (x, cset_str, fourth) cset_str_emplace(&fifth, x.val->str);
+ c_foreach (x, cset_str, second) cset_str_emplace(&fifth, x.ref->str);
+ c_foreach (x, cset_str, third) cset_str_emplace(&fifth, x.ref->str);
+ c_foreach (x, cset_str, fourth) cset_str_emplace(&fifth, x.ref->str);
c_del(cset_str, &first, &second, &third, &fourth);
printf("fifth contains:\n\n");
- c_foreach (x, cset_str, fifth) printf("%s\n", x.val->str);
+ c_foreach (x, cset_str, fifth) printf("%s\n", x.ref->str);
cset_str_del(&fifth);
return 0;