diff options
author | Chris Robinson <[email protected]> | 2013-10-28 11:06:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-28 11:06:04 -0700 |
commit | 034935b2e16a5886377018de973e90490102ca90 (patch) | |
tree | ed163dea3eb8fcc9ed988573cd079ba4af642b72 /OpenAL32/Include | |
parent | c1cdd3095bf2334298b6965f5e4f49510a826bd6 (diff) |
Modify how VCALL is handled
Now instead of specifying the arguments as a third argument to the macro, like
VCALL(object,function,(arg1, arg2));
they are specified separately after the macro, like
VCALL(object,function)(arg1, arg2);
Also, VCALL_NOARGS has been removed in favor of VCALL0, which behaves like
above but expects an empty argument list (a separate macro is needed to work
around preprocessor limitations).
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 74c5b0e6..b103848c 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -99,20 +99,20 @@ 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)) + /* Helper to extract an argument list for VCALL. Not used directly. */ -#define EXTRACT_VCALL_ARGS(...) __VA_ARGS__ +#define EXTRACT_VCALL_ARGS(...) __VA_ARGS__)) /* Call a "virtual" method on an object, with arguments. */ -#define VCALL(obj, func, args) ((obj)->vtbl->func((obj), EXTRACT_VCALL_ARGS args)) +#define VCALL(obj, func) ((obj)->vtbl->func((obj), EXTRACT_VCALL_ARGS /* Call a "virtual" method on an object, with no arguments. */ -#define VCALL0(obj, func, args) ((obj)->vtbl->func((obj))) -#define VCALL_NOARGS(obj, func) ((obj)->vtbl->func((obj))) +#define VCALL0(obj, func) ((obj)->vtbl->func((obj) EXTRACT_VCALL_ARGS #define DELETE_OBJ(obj) do { \ if((obj) != NULL) \ { \ - VCALL_NOARGS((obj),Destruct); \ - VCALL_NOARGS((obj),Delete); \ + VCALL0((obj),Destruct)(); \ + VCALL0((obj),Delete)(); \ } \ } while(0) |