aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-28 02:05:57 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-28 02:05:57 -0400
commit2ec9f76b7221938061d12e268e97bc33e5653a8e (patch)
tree478a13579034b8bf0a2a533f59ed526b6667573d /utils.h
parentacdb6ff91b60dab1c65d92f2de35a553ebcb3301 (diff)
Rename 'Match' macro to avoid confusion
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 628492e..5fcd21c 100644
--- a/utils.h
+++ b/utils.h
@@ -20,6 +20,8 @@
__expr; \
})
+#define When(x, _tag) ((x)->type == _tag ? &(x)->__tagged._tag : (errx(1, __FILE__ ":%d This was supposed to be a " # _tag "\n", __LINE__), &(x)->__tagged._tag))
+
#ifndef public
#define public __attribute__ ((visibility ("default")))
#endif