diff options
| author | Tyge Løvset <[email protected]> | 2022-08-08 17:25:44 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-08-08 17:25:44 +0200 |
| commit | d6285fa4451b07aedf762adadf299c25448f7c20 (patch) | |
| tree | 6ddc5fcf3dc6a8db1d7f5471cedb7e3d03d421e4 /docs | |
| parent | d7656cbc37e9bb2829bb14946d4f05b451611205 (diff) | |
| download | STC-modified-d6285fa4451b07aedf762adadf299c25448f7c20.tar.gz STC-modified-d6285fa4451b07aedf762adadf299c25448f7c20.zip | |
Fix docs syntax error.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 0fb1a575..45c5e166 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -141,12 +141,12 @@ c_forarray (int, v, {1, 2, 3}) cvec_i_push_back(&vec, *v); // insert in existing map -c_forarray (cmap_ii_raw, v, { {4, 5}, {6, 7} }) +c_forarray (cmap_ii_raw, v, {{4, 5}, {6, 7}}) cmap_ii_insert(&map, v->first, v->second); // even define an anonymous struct inside it (no commas allowed) -c_forarray (struct { int a; int b; }, v, { {1, 2}, {3, 4}, {5, 6} }) - printf("{%d %d} ", v->a, v->b); +c_forarray (struct { int a; int b; }, v, {{1, 2}, {3, 4}, {5, 6}}) + printf("(%d %d) ", v->a, v->b); // `c_forarray_p` is required for pointer type elements c_forarray_p (const char*, v, {"Hello", "crazy", "world"}) @@ -167,7 +167,7 @@ c_forarray_p (const char*, v, {"Hello", "crazy", "world"}) #define i_tag ii #include <stc/csmap.h> ... -c_forarray (csmap_ii_value, v, { {23,1}, {3,2}, {7,3}, {5,4}, {12,5} }) +c_forarray (csmap_ii_value, v, {{23,1}, {3,2}, {7,3}, {5,4}, {12,5}}) csmap_ii_insert(&map, v->first, v->second); c_foreach (i, csmap_ii, map) |
