mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 16:59:08 +00:00
feat(handle): improve handle macros
This commit is contained in:
parent
5121638c27
commit
595e431d92
3 changed files with 31 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue