Re:A simple defer feature for C
by jstimpfle on Tuesday January 18, 2022 @02:21PM
(#29984331)
Sure, you'd code like
Actually, to allow variable declarations in the init_stmt like above, you'll need to use two nested for-loops:
It is natural to add another layer of specific usage macro like this:
Naturally, if you're already on C++, better code these macros in terms of RAII instead of abusing for-loops. That will add a little robustness.
[ Parent
| on HN ]