summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_utility.h
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2005-05-19 10:22:28 +0000
committerMichal Krol <mjkrol@gmail.org>2005-05-19 10:22:28 +0000
commite5ff2b94ff16a05d4c5928a85199291e2e7f234e (patch)
tree2bb05eb01584ae55b74a06bc7dc7e0e705a1a5a5 /src/mesa/shader/slang/slang_utility.h
parent216f89318ee455ec5e74f836184c1e55e8ec8a92 (diff)
add static_assert macro
Diffstat (limited to 'src/mesa/shader/slang/slang_utility.h')
-rw-r--r--src/mesa/shader/slang/slang_utility.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h
index 6eb5369acd..0240385e8d 100644
--- a/src/mesa/shader/slang/slang_utility.h
+++ b/src/mesa/shader/slang/slang_utility.h
@@ -29,6 +29,8 @@
extern "C" {
#endif
+#define static_assert(expr) do { int _array[(expr) ? 1 : 0]; _array[0]; } while (0)
+
void slang_alloc_free (void *);
void *slang_alloc_malloc (unsigned int);
void *slang_alloc_realloc (void *, unsigned int, unsigned int);