diff options
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index d234ae13..a1a90b2f 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -62,6 +62,10 @@ static const union { #define COUNTOF(x) (sizeof((x))/sizeof((x)[0])) +#define DERIVE_FROM_TYPE(t) t t##_parent +#define GET_DERIVED_TYPE(t, o) (&(o)->t##_parent) +#define GET_PARENT_TYPE(t1, t2, o) ((t1*)((char*)(o) - offsetof(t1, t2##_parent))) + #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN |