aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-29 11:22:18 -0700
committerChris Robinson <[email protected]>2013-10-29 11:22:18 -0700
commitd4aa4e16a0b6bb53ec9bbe0a8b3f467fb9a243f7 (patch)
tree6c34a62f7675b06375cc4ef23afe01cfdc4c1f85 /OpenAL32
parentd2b36159431789d6934f5569e54982d7c54c4e84 (diff)
Add a macro to forward methods to a base type
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index a8175ce7..81ed726b 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -102,6 +102,9 @@ static const union {
#define SET_VTABLE1(T1, obj) ((obj)->vtbl = GET_VTABLE1(T1))
#define SET_VTABLE2(T1, T2, obj) (STATIC_CAST(T2, obj)->vtbl = GET_VTABLE2(T1, T2))
+#define DECLARE_FORWARD(T1, T2, rettype, func) \
+rettype T1##_##func(T1 *obj) \
+{ return T2##_##func(STATIC_CAST(T2, obj)); }
/* Helper to extract an argument list for VCALL. Not used directly. */
#define EXTRACT_VCALL_ARGS(...) __VA_ARGS__))