summaryrefslogtreecommitdiffhomepage
path: root/docs/cset_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-07-18 02:36:04 +0200
committerGitHub <[email protected]>2023-07-18 02:36:04 +0200
commitda70303c149b37dbf442e41038a00836132562ee (patch)
tree06d795c66d6759e06de5f2d166215b461ac40d1d /docs/cset_api.md
parent071b41c0fe95cb3f9a72bbe0417d856e7989ca08 (diff)
parent23eeedb3fc298602732f394adba6a43c876ca7d8 (diff)
downloadSTC-modified-da70303c149b37dbf442e41038a00836132562ee.tar.gz
STC-modified-da70303c149b37dbf442e41038a00836132562ee.zip
Merge branch 'dev43' into master
Diffstat (limited to 'docs/cset_api.md')
-rw-r--r--docs/cset_api.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/cset_api.md b/docs/cset_api.md
index 026d7462..e894ad4f 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -18,8 +18,8 @@ A **cset** is an associative container that contains a set of unique objects of
#define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy
#define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy
-#define i_tag // alternative typename: cmap_{i_tag}. i_tag defaults to i_val
-#define i_ssize // default int32_t. If defined, table expand 2x (else 1.5x)
+#define i_tag // alternative typename: cmap_{i_tag}. i_tag defaults to i_key
+#define i_expandby // default 1. If 2, table expand 2x (else 1.5x)
#include <stc/cset.h>
```
`X` should be replaced by the value of `i_tag` in all of the following documentation.
@@ -77,16 +77,17 @@ cset_X_value cset_X_value_clone(cset_X_value val);
## Example
```c
+#define i_implement
#include <stc/cstr.h>
#define i_type Strset
#define i_key_str
#include <stc/cset.h>
-int main ()
+int main(void)
{
Strset first, second={0}, third={0}, fourth={0}, fifth;
- first = c_make(Strset, {"red", "green", "blue"});
+ first = c_init(Strset, {"red", "green", "blue"});
fifth = Strset_clone(second);
c_forlist (i, const char*, {"orange", "pink", "yellow"})