change uc_hook_del() to take hook handle by value
This commit is contained in:
parent
ad59de2b51
commit
20bdbf638d
@ -382,7 +382,7 @@ uc_err uc_hook_add(struct uc_struct *uc, uc_hook_h *hh, uc_hook_t type, void *ca
|
|||||||
for detailed error).
|
for detailed error).
|
||||||
*/
|
*/
|
||||||
UNICORN_EXPORT
|
UNICORN_EXPORT
|
||||||
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h *hh);
|
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h hh);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Map memory in for emulation.
|
Map memory in for emulation.
|
||||||
|
6
uc.c
6
uc.c
@ -649,12 +649,8 @@ uc_err uc_hook_add(struct uc_struct *uc, uc_hook_h *hh, uc_hook_t type, void *ca
|
|||||||
}
|
}
|
||||||
|
|
||||||
UNICORN_EXPORT
|
UNICORN_EXPORT
|
||||||
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h *hh)
|
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h hh)
|
||||||
{
|
{
|
||||||
if (*hh == 0)
|
|
||||||
// invalid handle
|
|
||||||
return UC_ERR_HANDLE;
|
|
||||||
|
|
||||||
return hook_del(uc, hh);
|
return hook_del(uc, hh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user