Derive-C
Loading...
Searching...
No Matches
scope.h
Go to the documentation of this file.
1#pragma once
3
5#define DC_SCOPED(type) __attribute__((cleanup(type##_delete))) type
6
8DC_ZERO_SIZED(sentinel);
9
12#define DC_DEFER(fcn) __attribute__((cleanup(fcn))) sentinel PRIV(NS(sentinel, __COUNTER__)) = {}
#define DC_ZERO_SIZED(TYPE)
Zero sized types are useful as markers (e.g. for gdb printing, or to replace debug info structs.
Definition zerosized.h:15