Use UC_MMIO_READ/WRITE_TYPE

This commit is contained in:
lazymio 2022-05-18 13:18:17 +02:00
parent 2800561a96
commit 720c61344f
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873

View File

@ -595,8 +595,8 @@ class Uc(object):
cb(self, offset, size, value, data)
def mmio_map(self, address: int, size: int,
read_cb: Callable[[Uc, int, int, Any], int], user_data_read: Any,
write_cb: Callable[[Uc, int, int, int, Any], None], user_data_write: Any):
read_cb: UC_MMIO_READ_TYPE, user_data_read: Any,
write_cb: UC_MMIO_WRITE_TYPE, user_data_write: Any):
internal_read_cb = ctypes.cast(UC_MMIO_READ_CB(self._mmio_map_read_cb), UC_MMIO_READ_CB)
internal_write_cb = ctypes.cast(UC_MMIO_WRITE_CB(self._mmio_map_write_cb), UC_MMIO_WRITE_CB)