From 3a3b17c0a49863cd486bdbacf12a7918767d7f92 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 3 Jun 2021 16:50:07 +0200 Subject: Final docs cleanup. --- docs/ccommon_api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 92687056..ddf3783c 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -4,12 +4,12 @@ The following handy macros are safe to use, i.e. have no side-effects. ### c_fordefer, c_forscope, c_forvar, c_forvar_initdel General ***defer*** mechanics for resource acquisition. These macros allows to specify the release of the -resource near the resource acquisition, and makes it easier to verify that resources will be released. +resource where the resource acquisition takes place. Makes it easier to verify that resources are released. -**Note**: These macros are one-time executed **for**-loops. ***Only*** use `continue` in order to break out -of a `c_forvar` / `c_fordefer`-block. ***Do not*** use `return`, `goto` or `break`, as it will prevent the -`end`-statement to be executed at the end. The same applies for `c_forbuffer`. This is not particular to -the `c_for*()` macros, as one must always make sure to unwind temporary allocated resources before `return` in C. +**Note**: These macros are one-time executed **for-loops**. Use ***only*** `continue` in order to break out +of a `c_for*`-block. ***Do not*** use `return`, `goto` or `break`, as they will prevent the `end`-statement to +be executed when leaving scope. This is not particular to the `c_for*()` macros, as one must always make sure +to unwind temporary allocated resources before a `return` in C. | Usage | Description | |:---------------------------------------|:--------------------------------------------------| -- cgit v1.2.3