diff options
| -rw-r--r-- | README.md | 20 | ||||
| -rw-r--r-- | examples/intrusive.c | 2 | ||||
| -rwxr-xr-x | examples/make.sh | 8 | ||||
| -rw-r--r-- | include/stc/utf8.h | 2 |
4 files changed, 7 insertions, 25 deletions
@@ -520,7 +520,7 @@ Memory efficiency - Renamed: type **csptr** to [**carc**](docs/carc_api.md) (atomic reference counted) smart pointer. - Renamed: ***i_key_csptr*** / ***i_val_csptr*** to `i_keyboxed` / `i_valboxed` for specifying **carc** and **cbox** values in containers. - Renamed: *csptr_X_make()* to `carc_X_from()`. -- Renamed: *cstr_lit()* to `cstr_lit(literal)`, and *cstr_assign_fmt()* to `cstr_printf()`. +- Renamed: *cstr_new()* to `cstr_lit(literal)`, and *cstr_assign_fmt()* to `cstr_printf()`. - Renamed: *c_default_fromraw()* to `c_default_from()`. - Changed: the [**c_apply**](docs/ccommon_api.md) macros API. - Replaced: *csview_first_token()* and *csview_next_token()* with one function: `csview_token()`. @@ -529,21 +529,3 @@ Memory efficiency - Added: `i_opt` template parameter: compile-time options: `c_no_cmp`, `c_no_clone`, `c_no_atomic`, `c_is_forward`; 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" - -## Migration guide from version 2 to 3 -Replace (regular expression) globally in code base (VS Code): -- `_del\b` ⟶ `_drop` -- `_compare\b` ⟶ `_cmp` -- `_rawvalue\b` ⟶ `_raw` -- `_equ\b` ⟶ `_eq` - -Replace (whole word + match case): -- `i_keydel` ⟶ `i_keydrop` -- `i_valdel` ⟶ `i_valdrop` -- `i_cnt` ⟶ `i_type` -- `cstr_lit` ⟶ `cstr_lit` -- `i_key_sptr` ⟶ `i_keyboxed` -- `i_val_sptr` ⟶ `i_valboxed` - -Non-regex, global match case replace: -- `csptr` ⟶ `carc` diff --git a/examples/intrusive.c b/examples/intrusive.c index d8236b04..acf4416d 100644 --- a/examples/intrusive.c +++ b/examples/intrusive.c @@ -49,4 +49,4 @@ int main() c_foreach (i, List2, list2) printf(" %d", i.ref->value); puts(""); } -}
\ No newline at end of file +} diff --git a/examples/make.sh b/examples/make.sh index 7dc07613..bd1392fc 100755 --- a/examples/make.sh +++ b/examples/make.sh @@ -6,11 +6,11 @@ if [ "$(uname)" = 'Linux' ]; then oflag='-o ' fi -#cc=gcc; cflags="-s -O2 -Wall -std=c99 -pedantic -Wfatal-errors $sanitize" -cc=gcc; cflags="-s -O2 -Werror -Wfatal-errors -Wall -Wpedantic -Wsign-compare -Wwrite-strings" # -Wconversion +#cc=gcc; cflags="-s -O2 -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall $sanitize" +cc=gcc; cflags="-s -O2 -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall -Wsign-compare -Wwrite-strings" # -Wconversion #cc=tcc; cflags="-Wall -std=c99" -#cc=clang; cflags="-s -O2 -Wall -std=c99 -pedantic -Wfatal-errors" -#cc=clang; cflags="-s -O2 -Wall -std=c99 -pedantic -Wfatal-errors -DSTC_CSTR_V1 -DSTC_CSMAP_V1" +#cc=clang; cflags="-s -O2 -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall -Wsign-compare -Wwrite-strings" +#cc=clang; cflags="-s -O2 -std=c99 -Werror -Wfatal-errors -Wpedantic -Wall -DSTC_CSTR_V1 -DSTC_CSMAP_V1" #cc=gcc; cflags="-x c++ -s -O2 -Wall -std=c++20" #cc=g++; cflags="-x c++ -s -O2 -Wall" #cc=cl; cflags="-O2 -nologo -W2 -MD" diff --git a/include/stc/utf8.h b/include/stc/utf8.h index cf36ee1c..db98acd9 100644 --- a/include/stc/utf8.h +++ b/include/stc/utf8.h @@ -92,4 +92,4 @@ STC_INLINE size_t utf8_pos(const char* s, size_t index) #if defined i_extern || defined STC_EXTERN # include "../src/utf8code.c" # undef i_extern -#endif
\ No newline at end of file +#endif |
