summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-10 11:47:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-10 11:47:54 +0000
commitc169b513898d165d0e016139b1766dfddbecceea (patch)
tree969e2c34f8cbb0b801fb650f1c99a94848998b40 /internal.h
parent716c93bed12e5dcc842a3668802e0cc60651b2f9 (diff)
internal.h: STATIC_ASSERT
* internal.h (STATIC_ASSERT): move from enum.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index dd4d182a21..22600da9e6 100644
--- a/internal.h
+++ b/internal.h
@@ -21,6 +21,8 @@ extern "C" {
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
+#define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
+
#define GCC_VERSION_SINCE(major, minor, patchlevel) \
(defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
((__GNUC__ > (major)) || \