diff options
| author | realtradam <[email protected]> | 2023-04-12 15:55:33 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-04-12 15:55:33 -0400 |
| commit | 0841165881871ee01b782129be681209aeed2423 (patch) | |
| tree | 8a76b61dcaab381b6b42305201ae8b6259f6b6c0 /docs/cbox_api.md | |
| parent | 554f3e8acf7855b5d6a90cc68cefb7445460b03c (diff) | |
| parent | 0516aa3ae823ed9a22b2c5f776948c8447c32c31 (diff) | |
| download | STC-modified-0841165881871ee01b782129be681209aeed2423.tar.gz STC-modified-0841165881871ee01b782129be681209aeed2423.zip | |
Merge branch 'master' into modified
Diffstat (limited to 'docs/cbox_api.md')
| -rw-r--r-- | docs/cbox_api.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/cbox_api.md b/docs/cbox_api.md index 8b03d004..ca4d90da 100644 --- a/docs/cbox_api.md +++ b/docs/cbox_api.md @@ -92,11 +92,12 @@ void int_drop(int* x) { int main() { - c_auto (IVec, vec) // declare and init vec, call drop at scope exit - c_auto (ISet, set) // similar - { - vec = c_make(Vec, {2021, 2012, 2022, 2015}); - + IVec vec = c_make(Vec, {2021, 2012, 2022, 2015}); + ISet set = {0}; + c_defer( + IVec_drop(&vec), + ISet_drop(&set) + ){ printf("vec:"); c_foreach (i, IVec, vec) printf(" %d", *i.ref->get); |
