From 3ec5c9cbfc26bf715451c83026832f1fdfd25092 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 4 May 2024 02:02:35 +0200 Subject: Add STR() and CONCAT() to macros.h --- include/macros.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/macros.h b/include/macros.h index 4a8108e..d4b53b4 100644 --- a/include/macros.h +++ b/include/macros.h @@ -11,6 +11,12 @@ #define streq(...) (!strcmp(__VA_ARGS__)) #define u8eq(...) (!u8cmp(__VA_ARGS__)) +#define _MLIB_STR(s) #s +#define _MLIB_CONCAT(x, y) x##y + +#define STR(s) _MLIB_STR(s) +#define CONCAT(x, y) _MLIB_CONCAT(x, y) + #ifdef NDEBUG # include # define ASSUME(p) ((p) ? (void)0 : unreachable()) -- cgit v1.2.3