Go to the source code of this file.
|
| #define | DC_SCOPED(type, ...) |
| | RAII in C. Call the destructor when the variable goes out of scope.
|
| #define | DC_DEFER(fcn) |
◆ DC_DEFER
Value:__attribute__((cleanup(fcn))) sentinel
PRIV(
NS(sentinel, __COUNTER__)) = {}
Call the function with a null 'sentinel' value.
- Useful for cleanup that does not take arguments
Definition at line 12 of file scope.h.
◆ DC_SCOPED
| #define DC_SCOPED |
( |
| type, |
|
|
| ... ) |
Value:__attribute__((cleanup(
NS(type,
delete)))) type __VA_ARGS__
RAII in C. Call the destructor when the variable goes out of scope.
- Examples
- complex/employees.c, complex/prime_sieve.c, container/arena.c, container/bitset.c, container/map.c, container/queue.c, container/set.c, container/vector.c, utils/log.c, utils/option.c, utils/result.c, and utils/string_builder.c.
Definition at line 5 of file scope.h.
◆ DC_ZERO_SIZED()
| DC_ZERO_SIZED |
( |
sentinel | | ) |
|