aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/util.h')
-rw-r--r--src/stdlib/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/util.h b/src/stdlib/util.h
index 25cd49f9..3b00e6e9 100644
--- a/src/stdlib/util.h
+++ b/src/stdlib/util.h
@@ -14,7 +14,7 @@
#define new(t, ...) ((t*)memcpy(GC_MALLOC(sizeof(t)), &(t){__VA_ARGS__}, sizeof(t)))
#define heap(x) (__typeof(x)*)memcpy(GC_MALLOC(sizeof(x)), (__typeof(x)[1]){x}, sizeof(x))
#define stack(x) (__typeof(x)*)((__typeof(x)[1]){x})
-#define check_initialized(var, name) *({ if (!var ## $initialized) fail("The variable " name " is being accessed before it has been initialized!"); \
+#define check_initialized(var, init_var, name) *({ if (!init_var) fail("The variable " name " is being accessed before it has been initialized!"); \
&var; })
#define IF_DECLARE(decl, expr, block) if (({ decl; expr ? ({ block; 1; }) : 0; })) {}