From d6285fa4451b07aedf762adadf299c25448f7c20 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 8 Aug 2022 17:25:44 +0200 Subject: Fix docs syntax error. --- docs/ccommon_api.md | 8 ++++---- 1 file 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 ... -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) -- cgit v1.2.3