diff options
| author | Tyge Løvset <[email protected]> | 2023-07-18 02:36:04 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-18 02:36:04 +0200 |
| commit | da70303c149b37dbf442e41038a00836132562ee (patch) | |
| tree | 06d795c66d6759e06de5f2d166215b461ac40d1d /docs/csset_api.md | |
| parent | 071b41c0fe95cb3f9a72bbe0417d856e7989ca08 (diff) | |
| parent | 23eeedb3fc298602732f394adba6a43c876ca7d8 (diff) | |
| download | STC-modified-da70303c149b37dbf442e41038a00836132562ee.tar.gz STC-modified-da70303c149b37dbf442e41038a00836132562ee.zip | |
Merge branch 'dev43' into master
Diffstat (limited to 'docs/csset_api.md')
| -rw-r--r-- | docs/csset_api.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/csset_api.md b/docs/csset_api.md index e83ab857..aef3af3c 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -18,8 +18,7 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo #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: csset_{i_tag}. i_tag defaults to i_val -#define i_ssize // defaults to int32_t +#define i_tag // alternative typename: csset_{i_tag}. i_tag defaults to i_key #include <stc/csset.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. @@ -77,17 +76,18 @@ csset_X_value csset_X_value_clone(csset_X_value val); ## Example ```c +#define i_implement #include <stc/cstr.h> #define i_type SSet #define i_key_str #include <stc/csset.h> -int main () +int main(void) { SSet second={0}, third={0}, fourth={0}, fifth={0}; - second = c_make(SSet, {"red", "green", "blue"}); + second = c_init(SSet, {"red", "green", "blue"}); c_forlist (i, const char*, {"orange", "pink", "yellow"}) SSet_emplace(&third, *i.ref); |
