diff options
Diffstat (limited to 'ircd.h')
| -rw-r--r-- | ircd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ircd.h b/ircd.h index 07bdd0f..6035b79 100644 --- a/ircd.h +++ b/ircd.h @@ -30,6 +30,10 @@ #define BIT(x) x##_BIT, x = 1 << x##_BIT, x##_BIT_ = x##_BIT #define lengthof(X) (sizeof(X) / sizeof(*(X))) + +/* when `ensure' is used, it's better to think of it like it's the condition under which code + * below "exists" (so, ensure that `cond' evaluates to true), and not like it's a condition when + * to stop, trying to invert cond */ #define ensure(cond, iffalse, doexit) if (!(cond)) { iffalse; if (doexit >= 0) return doexit; } struct Message |