diff options
| author | Tyge Løvset <[email protected]> | 2021-05-25 11:03:32 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-25 11:03:32 +0200 |
| commit | 0a97cf5da44ef44246e17b257db4589fb9881b9c (patch) | |
| tree | e26318c65d8e42d5dc98e9fcc4efd4fb17a369d3 /docs | |
| parent | eb4450324de7211fbd8c80a2c566f3a1bfddd3c7 (diff) | |
| download | STC-modified-0a97cf5da44ef44246e17b257db4589fb9881b9c.tar.gz STC-modified-0a97cf5da44ef44246e17b257db4589fb9881b9c.zip | |
Refactor cleanup
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 93f46bf4..b4b548a8 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -20,10 +20,11 @@ The **c_forbuffer** uses stack memory if buffer is <= to 256 bytes, othewise it | `c_forbuffer (buf, type, n)` | Declare, allocate and free memory buffer | The `acquire`argument must be of the form: `type var = GetResource`. For multiple variables, use multiple -`c_forvar` in sequence, or if variables are of same type, the `c_arg` macro can be used: -``` +**c_forvar** in sequence, or if variables are of same type, the **c_arg** macro can be used: +```c c_forvar (c_arg(cstr s1 = cstr_lit("Hello"), s2 = cstr_lit("world")), cstr_del(&s1), cstr_del(&s2)) { + printf("%s %s\n", s1.str, s2.str); } ``` **Example**: Load each line of a text file into a vector of strings: |
