diff -r 7dcb118abe09 -r 257f0837a885 sourcehook/test/test2.cpp --- a/sourcehook/test/test2.cpp Mon May 07 18:33:34 2007 +0000 +++ b/sourcehook/test/test2.cpp Mon May 07 18:35:59 2007 +0000 @@ -50,6 +50,11 @@ } }; + // GCC's optimizer is too good. I had to add this in order to make it execute a virtual table lookup! + class Whatever : public IGaben + { + }; + SH_DECL_HOOK0_void(IGaben, EatYams, SH_NOATTRIB, 0); SH_DECL_HOOK1(IGaben, EatYams, const, 1, bool, const char *); SH_DECL_HOOK2_void_vafmt(IGaben, Vafmt1, SH_NOATTRIB, 0, bool, int); @@ -92,7 +97,7 @@ GET_SHPTR(g_SHPtr); g_PLID = 1337; - IGaben gabgab; + Whatever gabgab; IGaben *pGab = &gabgab; SourceHook::CallClass *cc = SH_GET_CALLCLASS(pGab);