summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-05-21 14:55:04 +0200
committerTyge Løvset <[email protected]>2021-05-21 14:55:04 +0200
commit345bff3cc9a36135a00bb963b3fada09d054980d (patch)
tree69487c6e9e156e4fc01cb5445c776803f919ee9d /docs
parent141c31a725ef0509998b208f4dda897347cbe4f2 (diff)
downloadSTC-modified-345bff3cc9a36135a00bb963b3fada09d054980d.tar.gz
STC-modified-345bff3cc9a36135a00bb963b3fada09d054980d.zip
Allow up to 3 vars in the c_withvar (type, v1, v2, v3) statement.
Diffstat (limited to 'docs')
-rw-r--r--docs/ccommon_api.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md
index 6ccec29e..3a2ee521 100644
--- a/docs/ccommon_api.md
+++ b/docs/ccommon_api.md
@@ -13,10 +13,10 @@ constructors are defined. This ensures that resources are released after usage,
|:---------------------------------|:--------------------------------------------------|
| `c_with (acquire, release)` | Do `acquire`. Defer `release` to end of block |
| `c_defer (release...)` | Defer `release` to end of defer block |
-| `c_withvar (type, var)` | `c_with (type var = type_init(), type_del(&var))` |
+| `c_withvar (type, v1,...v3)` | `c_with (type v1 = type_init(), type_del(&v1))` |
| `c_withbuf (buf, type, n)` | Declare, allocate and free memory buffer |
-The `acquire`argument must be of the form: `type var = get_resource`.
+The `acquire`argument must be of the form: `type var = getResource`.
**c_with** and **c_defer** are general macros, whereas **c_withvar** requires that there
are methods *type_init()* to create and return an object of type, and *type_del()*
that destructs the object. These are available for all STC containers.