1.1 --- a/sourcehook/test/test3.cpp Fri May 11 19:21:14 2007 +0000
1.2 +++ b/sourcehook/test/test3.cpp Sat May 12 08:08:01 2007 +0000
1.3 @@ -87,11 +87,10 @@
1.4 // Get a callclass for pD
1.5 // Verify whether the this pointers are correct
1.6 // Also call them normally to make sure that we aren't messing it up ;)
1.7 - SourceHook::CallClass<Derived> *pD_CC = SH_GET_CALLCLASS(pD);
1.8
1.9 - SH_CALL(pD_CC, &Derived::Func1)();
1.10 - SH_CALL(pD_CC, &Derived::Func2)();
1.11 - SH_CALL(pD_CC, &Derived::Func3)();
1.12 + SH_CALL(pD, &Derived::Func1)();
1.13 + SH_CALL(pD, &Derived::Func2)();
1.14 + SH_CALL(pD, &Derived::Func3)();
1.15 pD->Func1();
1.16 pD->Func2();
1.17 pD->Func3();
1.18 @@ -105,8 +104,8 @@
1.19 new State_Func3_Called(pD),
1.20 NULL), "Part 1");
1.21
1.22 - SH_CALL(pD_CC, &Base1::Func1)();
1.23 - SH_CALL(pD_CC, &Base2::Func2)();
1.24 + SH_CALL(pD, &Base1::Func1)();
1.25 + SH_CALL(pD, &Base2::Func2)();
1.26
1.27 CHECK_STATES((&g_States,
1.28 new State_Func1_Called(pB1),
1.29 @@ -116,11 +115,8 @@
1.30 // 2)
1.31 // Get callclasses for the other ones and verify it as well
1.32
1.33 - SourceHook::CallClass<Base1> *pB1_CC = SH_GET_CALLCLASS(pB1);
1.34 - SourceHook::CallClass<Base2> *pB2_CC = SH_GET_CALLCLASS(pB2);
1.35 -
1.36 - SH_CALL(pB1_CC, &Base1::Func1)();
1.37 - SH_CALL(pB2_CC, &Base2::Func2)();
1.38 + SH_CALL(pB1, &Base1::Func1)();
1.39 + SH_CALL(pB2, &Base2::Func2)();
1.40
1.41 CHECK_STATES((&g_States,
1.42 new State_Func1_Called(pB1),
1.43 @@ -214,11 +210,11 @@
1.44 new State_Func3_Called(pD),
1.45 NULL), "Part 5.1");
1.46
1.47 - SH_CALL(pD_CC, &Derived::Func1)();
1.48 - SH_CALL(pD_CC, &Derived::Func2)();
1.49 - SH_CALL(pD_CC, &Derived::Func3)();
1.50 - SH_CALL(pB1_CC, &Base1::Func1)();
1.51 - SH_CALL(pB2_CC, &Base2::Func2)();
1.52 + SH_CALL(pD, &Derived::Func1)();
1.53 + SH_CALL(pD, &Derived::Func2)();
1.54 + SH_CALL(pD, &Derived::Func3)();
1.55 + SH_CALL(pB1, &Base1::Func1)();
1.56 + SH_CALL(pB2, &Base2::Func2)();
1.57
1.58 CHECK_STATES((&g_States,
1.59 new State_Func1_Called(pB1),
1.60 @@ -232,9 +228,5 @@
1.61 SH_REMOVE_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false);
1.62 SH_REMOVE_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false);
1.63
1.64 - SH_RELEASE_CALLCLASS(pB1_CC);
1.65 - SH_RELEASE_CALLCLASS(pB2_CC);
1.66 - SH_RELEASE_CALLCLASS(pD_CC);
1.67 -
1.68 return true;
1.69 }