diff options
Diffstat (limited to 'src/defines.h')
-rw-r--r-- | src/defines.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/defines.h b/src/defines.h index 79b735d..52aa7b0 100644 --- a/src/defines.h +++ b/src/defines.h @@ -42,6 +42,13 @@ _Static_assert(sizeof(ptrdiff_t) == 8, ""); #define alignof(x) _Alignof(x) +// Wrap a u32 to make a type-safe "handle" or ID +#define CORE_DEFINE_HANDLE(name) \ + typedef struct name name; \ + struct name { \ + u32 raw; \ + } + /* Possible platform defines: #define CEL_PLATFORM_LINUX 1 |