summaryrefslogtreecommitdiff
path: root/src/wasm-internal.h
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2015-09-13 20:37:30 -0700
committerBen Smith <binji@chromium.org>2015-09-13 20:41:07 -0700
commit35ed980d7bf7af3209ba9f6f70aae58e9cf7df56 (patch)
treedb2f09fc2f265c8d18cc43227c69dfae00335369 /src/wasm-internal.h
parent1cc694b599fdf11ffa5cdd05265d6755d99a5623 (diff)
downloadwabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.tar.gz
wabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.tar.bz2
wabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.zip
move common definitions to wasm-internal.h
Diffstat (limited to 'src/wasm-internal.h')
-rw-r--r--src/wasm-internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm-internal.h b/src/wasm-internal.h
new file mode 100644
index 00000000..9108fe5e
--- /dev/null
+++ b/src/wasm-internal.h
@@ -0,0 +1,10 @@
+#ifndef WASM_INTERNAL_H
+#define WASM_INTERNAL_H
+
+#define FATAL(...) fprintf(stderr, __VA_ARGS__), exit(1)
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+#define STATIC_ASSERT__(x, c) typedef char static_assert_##c[x ? 1 : -1]
+#define STATIC_ASSERT_(x, c) STATIC_ASSERT__(x, c)
+#define STATIC_ASSERT(x) STATIC_ASSERT_(x, __COUNTER__)
+
+#endif /* WASM_INTERNAL_H */