diff options
| author | Tyge Løvset <[email protected]> | 2021-12-12 21:33:22 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-12 21:33:22 +0100 |
| commit | d57b9bb7666753c7cf7ab5a0da6d7d11f303c2af (patch) | |
| tree | 258690df4a5ab62055261579967d6dfffaf5b0fd /examples/splitstr.c | |
| parent | 9cd20ebfc4f1e10153ff814085499223265ef902 (diff) | |
| download | STC-modified-d57b9bb7666753c7cf7ab5a0da6d7d11f303c2af.tar.gz STC-modified-d57b9bb7666753c7cf7ab5a0da6d7d11f303c2af.zip | |
- Added **cbox** type: container of one element: similar to std::unique_ptr / Rust Box.
- Replaced example for **csptr** in docs.
- Added [**c_forpair**](docs/ccommon_api.md) macro: for-loop with "structural binding" as in c++.
- Deprecated *csptr_X_make()*. Renamed to *csptr_X_new()*. Corresponding **cbox** method is *cbox_X_new()*.
- Deprecated *c_default_fromraw(raw)*. Renamed to *c_default_clone(raw)*.
- Deprecated `i_key_csptr` / `i_val_csptr`. Use `i_key_ref` / `i_val_ref` when specifying containers with **csptr** or **cbox** elements.
- Deprecated `i_cnt`. Use `i_type` instead to define the full container type name.
- Bugfixes and docs updates.
Diffstat (limited to 'examples/splitstr.c')
| -rw-r--r-- | examples/splitstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/splitstr.c b/examples/splitstr.c index 82914485..baa48d21 100644 --- a/examples/splitstr.c +++ b/examples/splitstr.c @@ -5,7 +5,7 @@ void print_split(csview str, csview sep) csview token = csview_first_token(str, sep);
for (;;) {
// print non-null-terminated csview
- printf("\t\"%.*s\"\n", csview_ARG(token));
+ printf("\t\"%.*s\"\n", c_svarg(token));
if (csview_end(&token).ref == csview_end(&str).ref) break;
token = csview_next_token(str, sep, token);
}
|
