diff options
| author | Tyge Løvset <[email protected]> | 2021-12-29 14:39:56 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-29 14:39:56 +0100 |
| commit | 92f5421493932d00e63b33152331a36cc4fc9491 (patch) | |
| tree | e5d36c28d0fd548873216426bb00a6b59d2730dd | |
| parent | 7115f4539b7d08ec21c5e6132841b2613a74059d (diff) | |
| download | STC-modified-92f5421493932d00e63b33152331a36cc4fc9491.tar.gz STC-modified-92f5421493932d00e63b33152331a36cc4fc9491.zip | |
Some more docs.
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | docs/ccommon_api.md | 2 | ||||
| -rw-r--r-- | docs/clist_api.md | 2 | ||||
| -rw-r--r-- | docs/cmap_api.md | 2 | ||||
| -rw-r--r-- | docs/cset_api.md | 2 | ||||
| -rw-r--r-- | docs/csmap_api.md | 2 | ||||
| -rw-r--r-- | docs/csset_api.md | 2 | ||||
| -rw-r--r-- | examples/runall.sh | 1 |
8 files changed, 13 insertions, 11 deletions
@@ -6,11 +6,11 @@ STC - Smart Template Containers for C News ---- ### Version 3 released -This version introduces lots of enhancements, bugfixes and additions. There are also -a number of breaking changes, see below for changes and the migration guide. +This version introduces lots of enhancements, bugfixes and additions. There are also +a number of breaking changes, see below for changes and a migration guide. -Version 3 is planned to freeze the API, as far as possible. Any changes will be handled with long -lasting deprecations, so it should be ready for creating production code using it. +With version 3, the API is freezed as far as possible. Any changes will be handled with long +lasting deprecations, so you may develop production code using it. ### Brief summary of changes - Renamed: all ***_del*** to `_drop` (like destructors in Rust). @@ -24,7 +24,8 @@ lasting deprecations, so it should be ready for creating production code using i - Renamed: *c_default_fromraw()* to `c_default_clone()`. - Changed: the [**c_apply**](docs/ccommon_api.md) macros API. - Replaced: *csview_first_token()* and *csview_next_token()* with one function: `csview_token()`. -- Added: new general `i_key_bind` / `i_val_bind` template parameters which auto-binds template functions. +- Added: **checkauto** tool for checking that c-source files uses `c_auto*` macros correctly. +- Added: general `i_key_bind` / `i_val_bind` template parameters which auto-binds template functions. - Added: `i_opt` template parameter: compile-time options: `c_no_cmp`, `c_no_clone`, `c_no_atomic`, `c_is_fwd`; may be combined with `|` - Added: [**cbox**](docs/cbox_api.md) type: smart pointer, similar to [Rust Box](https://doc.rust-lang.org/rust-by-example/std/box.html) and [std::unique_ptr](https://en.cppreference.com/w/cpp/memory/unique_ptr). - Added: [**c_forpair**](docs/ccommon_api.md) macro: for-loop with "structured binding" diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index bd7029c4..3f21d3c0 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -20,7 +20,7 @@ macros, as one must always make sure to unwind temporary allocated resources bef | `c_breakauto;` | Break out of a `c_auto*`-block/scope without memleak | For multiple variables, use either multiple **c_autovar** in sequence, or declare variable outside -scope and use **c_autoscope**. Also, **c_auto** support up to 3 variables. +scope and use **c_autoscope**. Also, **c_auto** support up to 4 variables. ```c c_autovar (cstr s = cstr_new("Hello"), cstr_drop(&s)) { diff --git a/docs/clist_api.md b/docs/clist_api.md index fc54f40e..8f907eca 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -42,7 +42,7 @@ clist_X clist_X_clone(clist_X list); void clist_X_clear(clist_X* self); void clist_X_copy(clist_X* self, clist_X other); -void clist_X_drop(clist_X* self); // destructor +void clist_X_drop(clist_X* self); // destructor bool clist_X_empty(clist_X list); size_t clist_X_count(clist_X list); // size() in O(n) time diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 38346e53..5c029a29 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -47,7 +47,7 @@ void cmap_X_max_load_factor(cmap_X* self, float max_load); bool cmap_X_reserve(cmap_X* self, size_t size); void cmap_X_shrink_to_fit(cmap_X* self); void cmap_X_swap(cmap_X* a, cmap_X* b); -void cmap_X_drop(cmap_X* self); // destructor +void cmap_X_drop(cmap_X* self); // destructor size_t cmap_X_size(cmap_X map); size_t cmap_X_capacity(cmap_X map); // buckets * max_load_factor diff --git a/docs/cset_api.md b/docs/cset_api.md index 18454dcf..32488b81 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -33,7 +33,7 @@ void cset_X_max_load_factor(cset_X* self, float max_load); bool cset_X_reserve(cset_X* self, size_t size);
void cset_X_shrink_to_fit(cset_X* self);
void cset_X_swap(cset_X* a, cset_X* b);
-void cset_X_drop(cset_X* self); // destructor
+void cset_X_drop(cset_X* self); // destructor
size_t cset_X_size(cset_X set); // num. of allocated buckets
size_t cset_X_capacity(cset_X set); // buckets * max_load_factor
diff --git a/docs/csmap_api.md b/docs/csmap_api.md index c3f71a7c..65f932ea 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -40,7 +40,7 @@ csmap_X csmap_X_clone(csmap_x map); void csmap_X_clear(csmap_X* self); void csmap_X_copy(csmap_X* self, csmap_X other); void csmap_X_swap(csmap_X* a, csmap_X* b); -void csmap_X_drop(csmap_X* self); // destructor +void csmap_X_drop(csmap_X* self); // destructor size_t csmap_X_size(csmap_X map); bool csmap_X_empty(csmap_X map); diff --git a/docs/csset_api.md b/docs/csset_api.md index 01926453..561b8f8e 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -28,7 +28,7 @@ csset_X csset_X_clone(csset_x set); void csset_X_clear(csset_X* self);
void csset_X_copy(csset_X* self, csset_X other);
void csset_X_swap(csset_X* a, csset_X* b);
-void csset_X_drop(csset_X* self); // destructor
+void csset_X_drop(csset_X* self); // destructor
size_t csset_X_size(csset_X set);
bool csset_X_empty(csset_X set);
diff --git a/examples/runall.sh b/examples/runall.sh index 12c72684..e95068ff 100644 --- a/examples/runall.sh +++ b/examples/runall.sh @@ -24,6 +24,7 @@ fi if [ $run = 0 ] ; then for i in *.c ; do echo $cc -I../include $i $libs + ../checkauto $i $cc -I../include $i $libs done else |
