From 37013d414b8a921ba57391cff33dc70780721c3d Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 22 Feb 2013 11:00:32 +0000 Subject: [PATCH] add compiletimeassert.h --- CHANGES | 3 +++ compiletimeassert.h | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 compiletimeassert.h diff --git a/CHANGES b/CHANGES index 2c06dd0..7da2b22 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +0.30: + add compiletimeassert.h + 0.29: save 8 bytes in taia.h for 64-bit systems add buffer_tosa (buffer writing to auto-growing stralloc) diff --git a/compiletimeassert.h b/compiletimeassert.h new file mode 100644 index 0000000..977356d --- /dev/null +++ b/compiletimeassert.h @@ -0,0 +1,4 @@ + +#define __X(x, y) x ## y +#define __Y(x, y) __X(x, y) +#define compiletimeassert(cond) struct __Y(foo,__LINE__) { char __temp[1 - (!(cond))*2]; };