From 20cf4639e576baf9262b8222318d3e3696913411 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Thu, 14 Apr 2005 13:15:33 +0000 Subject: [PATCH] Added callclass macros --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%403 --- sourcehook/generate/sourcehook.hxx | 3 ++- sourcehook/sourcehook.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sourcehook/generate/sourcehook.hxx b/sourcehook/generate/sourcehook.hxx index 38ab94c..b293807 100755 --- a/sourcehook/generate/sourcehook.hxx +++ b/sourcehook/generate/sourcehook.hxx @@ -280,7 +280,8 @@ namespace SourceHook * @param ifacetype The type of the interface * @param ifaceptr The interface pointer */ -#define SH_GET_CALLCLASS(ifacetype, ifaceptr) g_SHPtr->GetCallClass(iface, sizeof(ifacetype)) +#define SH_GET_CALLCLASS(ifacetype, ifaceptr) reinterpret_cast(g_SHPtr->GetCallClass(ifaceptr, sizeof(ifacetype))) +#define SH_RELEASE_CALLCLASS(ptr) g_SHPtr->ReleaseCallClass(reinterpret_cast(ptr)) #define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ SourceHook::SH_FHAdd##ifacetype##ifacefunc((void*)ifaceptr, post, handler) diff --git a/sourcehook/sourcehook.h b/sourcehook/sourcehook.h index 993775b..bc19204 100644 --- a/sourcehook/sourcehook.h +++ b/sourcehook/sourcehook.h @@ -280,7 +280,8 @@ namespace SourceHook * @param ifacetype The type of the interface * @param ifaceptr The interface pointer */ -#define SH_GET_CALLCLASS(ifacetype, ifaceptr) g_SHPtr->GetCallClass(iface, sizeof(ifacetype)) +#define SH_GET_CALLCLASS(ifacetype, ifaceptr) reinterpret_cast(g_SHPtr->GetCallClass(ifaceptr, sizeof(ifacetype))) +#define SH_RELEASE_CALLCLASS(ptr) g_SHPtr->ReleaseCallClass(reinterpret_cast(ptr)) #define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ SourceHook::SH_FHAdd##ifacetype##ifacefunc((void*)ifaceptr, post, handler)