aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-18 01:11:50 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-18 01:11:50 -0400
commit976e73f4a275a48a8a73e32528b67be23538e3a5 (patch)
treed82ef9465e6fb3d97eda8cc5cc7914e708ac7715 /stdlib
parentc00c6d3e0224c33ac7d0ca65974fe359deb215cd (diff)
Move Match() to the right place
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/util.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/stdlib/util.h b/stdlib/util.h
index 95a40018..b68e59bc 100644
--- a/stdlib/util.h
+++ b/stdlib/util.h
@@ -14,7 +14,6 @@
#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 Match(x, _tag) ((x)->tag == _tag ? &(x)->__data._tag : (errx(1, __FILE__ ":%d This was supposed to be a " # _tag "\n", __LINE__), &(x)->__data._tag))
#define check_initialized(var, name) *({ if (!var ## $initialized) fail("The variable " name " is being accessed before it has been initialized!"); \
&var; })