summaryrefslogtreecommitdiffhomepage
path: root/docs/cmap_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-13 19:02:50 +0200
committerTyge Løvset <[email protected]>2022-08-13 19:02:50 +0200
commit9bdcf2090da121f8d0954dad35db48c7aa47b17e (patch)
treeb2d10dc4d069059434174e9cdee5251cae8ff10c /docs/cmap_api.md
parentccb63f1abbae18657708dd8ea38e0892aa0fc48a (diff)
downloadSTC-modified-9bdcf2090da121f8d0954dad35db48c7aa47b17e.tar.gz
STC-modified-9bdcf2090da121f8d0954dad35db48c7aa47b17e.zip
Experimental: Renamed c_autovar => c_with, c_autoscope => c_scope, c_autodefer => c_defer. May or may not be reverted before V4.0 release.
Diffstat (limited to 'docs/cmap_api.md')
-rw-r--r--docs/cmap_api.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 91c36def..792d6c8c 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -211,7 +211,7 @@ typedef struct { int x, y, z; } Vec3i;
int main()
{
// Define map with defered destruct
- c_autovar (cmap_vi vecs = cmap_vi_init(), cmap_vi_drop(&vecs))
+ c_with (cmap_vi vecs = cmap_vi_init(), cmap_vi_drop(&vecs))
{
cmap_vi_insert(&vecs, (Vec3i){100, 0, 0}, 1);
cmap_vi_insert(&vecs, (Vec3i){ 0, 100, 0}, 2);
@@ -244,7 +244,7 @@ typedef struct { int x, y, z; } Vec3i;
int main()
{
- c_auto (cmap_iv, vecs) // shorthand for c_autovar with _init(), _drop().
+ c_auto (cmap_iv, vecs) // shorthand for c_with with _init(), _drop().
{
cmap_iv_insert(&vecs, 1, (Vec3i){100, 0, 0});
cmap_iv_insert(&vecs, 2, (Vec3i){ 0, 100, 0});