feat(handle): improve handle macros

This commit is contained in:
fallenoak 2025-09-03 23:02:17 -05:00
parent 5121638c27
commit 595e431d92
3 changed files with 31 additions and 6 deletions

View file

@ -1,10 +1,12 @@
#ifndef STORM_HANDLE_HPP
#define STORM_HANDLE_HPP
#if !defined(DECLARE_HANDLE)
#define DECLARE_HANDLE(name) \
struct name##__; \
#define DECLARE_STORM_HANDLE(name) \
struct name##__ { int32_t unused; }; \
typedef struct name##__* name
#define DECLARE_STORM_CHILD_HANDLE(name, super) \
struct name##__ : public super##__ { int32_t unused; }; \
typedef struct name##__* name
#endif
#endif