From d4aa4e16a0b6bb53ec9bbe0a8b3f467fb9a243f7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 29 Oct 2013 11:22:18 -0700 Subject: Add a macro to forward methods to a base type --- OpenAL32/Include/alMain.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenAL32/Include') 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__)) -- cgit v1.2.3