Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unicorn-engine/unicorn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 71f8bf0312435da5cfb2807015843185efe19bea
Choose a base ref
..
head repository: unicorn-engine/unicorn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9bec0efb3cc52e921f388f4d84c34897bf9a7d3f
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +6 −6 bindings/python/unicorn/unicorn_py3/unicorn.py
12 changes: 6 additions & 6 deletions bindings/python/unicorn/unicorn_py3/unicorn.py
Original file line number Diff line number Diff line change
@@ -1048,7 +1048,7 @@ def hook_add(self, htype: int, callback: Callable, user_data: Any = None, begin:

def __hook_intr():
@uccallback(self, HOOK_INTR_CFUNC)
def __hook_intr_cb(uc: Uc, intno: int, key: int):
def __hook_intr_cb(uc: Uc, intno: int, key: int) -> None:
callback(uc, intno, user_data)

return (__hook_intr_cb,)
@@ -1061,7 +1061,7 @@ def __hook_insn():

def __hook_code():
@uccallback(self, HOOK_CODE_CFUNC)
def __hook_code_cb(uc: Uc, address: int, size: int, key: int):
def __hook_code_cb(uc: Uc, address: int, size: int, key: int) -> None:
callback(uc, address, size, user_data)

return (__hook_code_cb,)
@@ -1089,14 +1089,14 @@ def __hook_insn_invalid_cb(uc: Uc, key: int) -> bool:

def __hook_edge_gen():
@uccallback(self, HOOK_EDGE_GEN_CFUNC)
def __hook_edge_gen_cb(uc: Uc, cur: ctypes._Pointer[uc_tb], prev: ctypes._Pointer[uc_tb], key: int):
def __hook_edge_gen_cb(uc: Uc, cur: ctypes._Pointer[uc_tb], prev: ctypes._Pointer[uc_tb], key: int) -> None:
callback(uc, cur.contents, prev.contents, user_data)

return (__hook_edge_gen_cb,)

def __hook_tcg_opcode():
@uccallback(self, HOOK_TCG_OPCODE_CFUNC)
def __hook_tcg_op_cb(uc: Uc, address: int, arg1: int, arg2: int, size: int, key: int):
def __hook_tcg_op_cb(uc: Uc, address: int, arg1: int, arg2: int, size: int, key: int) -> None:
callback(uc, address, arg1, arg2, size, user_data)

opcode = ctypes.c_uint64(aux1)
@@ -1106,8 +1106,8 @@ def __hook_tcg_op_cb(uc: Uc, address: int, arg1: int, arg2: int, size: int, key:

def __hook_tlb_fill():
@uccallback(self, HOOK_TLB_FILL_CFUNC)
def __hook_tlb_fill_cb(uc: Uc, vaddr: int, access: int, entry: ctypes._Pointer[uc_tlb_entry], key: int):
callback(uc, vaddr, access, entry.contents, user_data)
def __hook_tlb_fill_cb(uc: Uc, vaddr: int, access: int, entry: ctypes._Pointer[uc_tlb_entry], key: int) -> bool:
return callback(uc, vaddr, access, entry.contents, user_data)

return (__hook_tlb_fill_cb,)