Example #1
0
func (u *uc) HookDel(hook Hook) error {
	if uptr, ok := hookToUintptr[hook]; ok {
		delete(hookToUintptr, hook)
		delete(hookDataMap, uptr)
	}
	return errReturn(C.uc_hook_del(u.handle, C.uc_hook(hook)))
}
Example #2
0
File: hook.go Project: 4577/unicorn
func (u *uc) HookDel(hook Hook) error {
	if uptr, ok := u.hooks[hook]; ok {
		delete(u.hooks, hook)
		hookDataLock.Lock()
		delete(hookDataMap, uptr)
		hookDataLock.Unlock()
	}
	return errReturn(C.uc_hook_del(u.handle, C.uc_hook(hook)))
}
Example #3
0
func (u *uc) HookDel(hook Hook) error {
	delete(hookRetain, hook)
	return errReturn(C.uc_hook_del(u.handle, C.uc_hook(hook)))
}