summaryrefslogtreecommitdiffhomepage
path: root/docs/csset_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-11 19:56:42 +0100
committerTyge Løvset <[email protected]>2023-02-11 19:56:42 +0100
commitd78701abc5bdd5f0f64cb1b08358a2c9d5f97974 (patch)
treef6c063f695583afb7500a81493af1296d1b569cc /docs/csset_api.md
parent9f8fc0e6b9bb56ea5cf9fbb27e25326f5cb96891 (diff)
downloadSTC-modified-d78701abc5bdd5f0f64cb1b08358a2c9d5f97974.tar.gz
STC-modified-d78701abc5bdd5f0f64cb1b08358a2c9d5f97974.zip
More docs improvements.
Diffstat (limited to 'docs/csset_api.md')
-rw-r--r--docs/csset_api.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/csset_api.md b/docs/csset_api.md
index 3d7698ed..4618bd18 100644
--- a/docs/csset_api.md
+++ b/docs/csset_api.md
@@ -20,6 +20,7 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo
#define i_cmp_functor // advanced, see examples/functor.c for similar usage.
#define i_tag // alternative typename: csset_{i_tag}. i_tag defaults to i_val
+#define i_size // defines csset_X_sizet type; defaults to int32_t
#include <stc/csset.h>
```
`X` should be replaced by the value of `i_tag` in all of the following documentation.
@@ -28,8 +29,8 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo
```c
csset_X csset_X_init(void);
-csset_X csset_X_with_capacity(intptr_t cap);
-bool csset_X_reserve(csset_X* self, intptr_t cap);
+csset_X csset_X_with_capacity(csset_X_sizet cap);
+bool csset_X_reserve(csset_X* self, csset_X_sizet cap);
void csset_X_shrink_to_fit(csset_X* self);
csset_X csset_X_clone(csset_x set);
@@ -37,7 +38,7 @@ void csset_X_clear(csset_X* self);
void csset_X_copy(csset_X* self, const csset_X* other);
void csset_X_drop(csset_X* self); // destructor
-intptr_t csset_X_size(const csset_X* self);
+csset_X_sizet csset_X_size(const csset_X* self);
bool csset_X_empty(const csset_X* self);
const csset_X_value* csset_X_get(const csset_X* self, i_keyraw rkey); // const get
@@ -51,7 +52,7 @@ csset_X_result csset_X_insert(csset_X* self, i_key key);
csset_X_result csset_X_push(csset_X* self, i_key key); // alias for insert()
csset_X_result csset_X_emplace(csset_X* self, i_keyraw rkey);
-intptr_t csset_X_erase(csset_X* self, i_keyraw rkey);
+int csset_X_erase(csset_X* self, i_keyraw rkey);
csset_X_iter csset_X_erase_at(csset_X* self, csset_X_iter it); // return iter after it
csset_X_iter csset_X_erase_range(csset_X* self, csset_X_iter it1, csset_X_iter it2); // return updated it2