test overriding a local function
This commit is contained in:
parent
4947fb5553
commit
5e76138b53
7 changed files with 81 additions and 1 deletions
|
|
@ -917,6 +917,29 @@ mach_error_t detour_detach(detour_func_t* inout_pointer, detour_func_t detour)
|
|||
return ERR_SUCCESS;
|
||||
}
|
||||
|
||||
mach_error_t detour_attach_and_commit(detour_func_t* inout_pointer, detour_func_t detour)
|
||||
{
|
||||
return detour_attach_and_commit_ex(inout_pointer, detour, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
mach_error_t detour_attach_and_commit_ex(detour_func_t* inout_pointer, detour_func_t detour, detour_func_t* out_real_trampoline, detour_func_t* out_real_target, detour_func_t* out_real_detour)
|
||||
{
|
||||
const mach_error_t error = detour_attach_ex(inout_pointer, detour, out_real_trampoline, out_real_target, out_real_detour);
|
||||
if (error != err_none) {
|
||||
return error;
|
||||
}
|
||||
return detour_transaction_commit();
|
||||
}
|
||||
|
||||
mach_error_t detour_detach_and_commit(detour_func_t* inout_pointer, detour_func_t detour)
|
||||
{
|
||||
const mach_error_t error = detour_detach(inout_pointer, detour);
|
||||
if (error != err_none) {
|
||||
return error;
|
||||
}
|
||||
return detour_transaction_commit();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// API Setters
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue