Skip to content

Commit

Permalink
Fix Python Bindings after changes to cs_detail
Browse files Browse the repository at this point in the history
capstone-engine#2034 changed the `regs_read` array size and added a new `writeback`
element to the cs_detail struct.

Those changes weren't reflected in the Python bindings causing details
to be missing.
  • Loading branch information
peace-maker committed Jun 5, 2023
1 parent 8ed8526 commit 5770ac0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindings/python/capstone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,13 @@ class _cs_arch(ctypes.Union):

class _cs_detail(ctypes.Structure):
_fields_ = (
('regs_read', ctypes.c_uint16 * 16),
('regs_read', ctypes.c_uint16 * 20),
('regs_read_count', ctypes.c_ubyte),
('regs_write', ctypes.c_uint16 * 20),
('regs_write_count', ctypes.c_ubyte),
('groups', ctypes.c_ubyte * 8),
('groups_count', ctypes.c_ubyte),
('writeback', ctypes.c_bool),
('arch', _cs_arch),
)

Expand Down

0 comments on commit 5770ac0

Please sign in to comment.