diff -r bee78b10b2c0 -r b35a5fdbc654 core-legacy/sourcehook/test/testbail2.cpp --- a/core-legacy/sourcehook/test/testbail2.cpp Fri Feb 27 00:19:50 2009 -0600 +++ b/core-legacy/sourcehook/test/testbail2.cpp Wed Oct 28 23:14:32 2009 -0700 @@ -5,7 +5,6 @@ #include "sourcehook_test.h" #include "testbail.h" -static unsigned int n_calls = 0; int EatYams_Handler2(int a) { @@ -25,25 +24,13 @@ { g_PLID = 2; - SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler2, false); - SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler3, false); + SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler2), false); + SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler3), false); int ret = g_Gabgab->EatYams(0xDEAD); CHECK_COND(ret == 6, "Part 2.1"); - n_calls++; - return true; } - - void UntestBail2() - { - while (n_calls) - { - SH_REMOVE_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler3, false); - SH_REMOVE_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler2, false); - n_calls--; - } - } }