summaryrefslogtreecommitdiffhomepage
path: root/docs/cbox_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-09-23 07:15:41 +0200
committerTyge Løvset <[email protected]>2022-09-23 07:15:41 +0200
commit34bec4fdf406caff8492d53f0afc80df5d75bba4 (patch)
tree94252139eb34cb37f561ec5a6b9513629b2a81a5 /docs/cbox_api.md
parentd70bcf4d875c14da30a39acfc37d00391cc1e7a9 (diff)
downloadSTC-modified-34bec4fdf406caff8492d53f0afc80df5d75bba4.tar.gz
STC-modified-34bec4fdf406caff8492d53f0afc80df5d75bba4.zip
Deprecated c_forarray, c_forarray_p macros - both replaced by c_forlist, and is consistent with other c_for* macros.
Diffstat (limited to 'docs/cbox_api.md')
-rw-r--r--docs/cbox_api.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/cbox_api.md b/docs/cbox_api.md
index 6686dde5..43fa46b0 100644
--- a/docs/cbox_api.md
+++ b/docs/cbox_api.md
@@ -91,8 +91,8 @@ int main()
c_auto (IVec, vec) // declare and init vec, call drop at scope exit
c_auto (ISet, set) // similar
{
- c_forarray (int, v, {2021, 2012, 2022, 2015})
- IVec_emplace(&vec, *v); // same as: IVec_push(&vec, IBox_from(*v));
+ c_forlist (i, int, {2021, 2012, 2022, 2015})
+ IVec_emplace(&vec, *i.ref); // same as: IVec_push(&vec, IBox_from(*i.ref));
printf("vec:");
c_foreach (i, IVec, vec)