diff -r 0e01c64820e1 -r 3a04ef79edf1 sourcehook/test/test3.cpp --- a/sourcehook/test/test3.cpp Fri May 11 19:21:14 2007 +0000 +++ b/sourcehook/test/test3.cpp Sat May 12 08:08:01 2007 +0000 @@ -87,11 +87,10 @@ // Get a callclass for pD // Verify whether the this pointers are correct // Also call them normally to make sure that we aren't messing it up ;) - SourceHook::CallClass *pD_CC = SH_GET_CALLCLASS(pD); - SH_CALL(pD_CC, &Derived::Func1)(); - SH_CALL(pD_CC, &Derived::Func2)(); - SH_CALL(pD_CC, &Derived::Func3)(); + SH_CALL(pD, &Derived::Func1)(); + SH_CALL(pD, &Derived::Func2)(); + SH_CALL(pD, &Derived::Func3)(); pD->Func1(); pD->Func2(); pD->Func3(); @@ -105,8 +104,8 @@ new State_Func3_Called(pD), NULL), "Part 1"); - SH_CALL(pD_CC, &Base1::Func1)(); - SH_CALL(pD_CC, &Base2::Func2)(); + SH_CALL(pD, &Base1::Func1)(); + SH_CALL(pD, &Base2::Func2)(); CHECK_STATES((&g_States, new State_Func1_Called(pB1), @@ -116,11 +115,8 @@ // 2) // Get callclasses for the other ones and verify it as well - SourceHook::CallClass *pB1_CC = SH_GET_CALLCLASS(pB1); - SourceHook::CallClass *pB2_CC = SH_GET_CALLCLASS(pB2); - - SH_CALL(pB1_CC, &Base1::Func1)(); - SH_CALL(pB2_CC, &Base2::Func2)(); + SH_CALL(pB1, &Base1::Func1)(); + SH_CALL(pB2, &Base2::Func2)(); CHECK_STATES((&g_States, new State_Func1_Called(pB1), @@ -214,11 +210,11 @@ new State_Func3_Called(pD), NULL), "Part 5.1"); - SH_CALL(pD_CC, &Derived::Func1)(); - SH_CALL(pD_CC, &Derived::Func2)(); - SH_CALL(pD_CC, &Derived::Func3)(); - SH_CALL(pB1_CC, &Base1::Func1)(); - SH_CALL(pB2_CC, &Base2::Func2)(); + SH_CALL(pD, &Derived::Func1)(); + SH_CALL(pD, &Derived::Func2)(); + SH_CALL(pD, &Derived::Func3)(); + SH_CALL(pB1, &Base1::Func1)(); + SH_CALL(pB2, &Base2::Func2)(); CHECK_STATES((&g_States, new State_Func1_Called(pB1), @@ -232,9 +228,5 @@ SH_REMOVE_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false); SH_REMOVE_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - SH_RELEASE_CALLCLASS(pB1_CC); - SH_RELEASE_CALLCLASS(pB2_CC); - SH_RELEASE_CALLCLASS(pD_CC); - return true; }