Merge pull request #1714 from Sh4ww/fix-type-hint-in-python-bindings

Fix type hint of reg_write in Python bindings. (#1706)
This commit is contained in:
lazymio 2022-09-27 23:52:24 +02:00 committed by GitHub
commit 2a3cc7a1b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -560,7 +560,7 @@ class Uc(object):
return reg_read(functools.partial(_uc.uc_reg_read, self._uch), self._arch, reg_id, opt)
# write to a register, tuple for arm cp regs.
def reg_write(self, reg_id: Union[int, ARMCPRegValue, ARM64CPRegValue, X86MMRReg, X86FPReg], value: int):
def reg_write(self, reg_id: int, value: Union[int, ARMCPRegValue, ARM64CPRegValue, X86MMRReg, X86FPReg]):
return reg_write(functools.partial(_uc.uc_reg_write, self._uch), self._arch, reg_id, value)
# read from MSR - X86 only