From 1b0779b97aac12c07501edbddaeec474f588fd6f Mon Sep 17 00:00:00 2001 From: Inokentiy Babushkin Date: Thu, 12 May 2016 08:50:05 +0200 Subject: [PATCH] Fixed python bindings to align with struct changes --- bindings/python/capstone/m68k.py | 11 +++++++++-- bindings/python/capstone/m68k_const.py | 7 ++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bindings/python/capstone/m68k.py b/bindings/python/capstone/m68k.py index cd6b70e4..cb5e5766 100644 --- a/bindings/python/capstone/m68k.py +++ b/bindings/python/capstone/m68k.py @@ -25,10 +25,17 @@ class M68KOpValue(ctypes.Union): ('dimm', ctypes.c_double), ('simm', ctypes.c_float), ('reg', ctypes.c_uint), + ('reg_pair', M68KOpRegPair), ('mem', M68KOpMem), ('register_bits', ctypes.c_uint), ) +class M68KOpRegPair(ctypes.Structure): + _fields_ = ( + ('reg_0', ctypes.c_uint), + ('reg_1', ctypes.c_uint), + ) + class M68KOp(ctypes.Structure): _fields_ = ( ('value', M68KOpValue), @@ -59,7 +66,7 @@ class M68KOp(ctypes.Structure): @property def register_bits(self): return self.value.register_bits - + class M68KOpSize(ctypes.Structure): _fields_ = ( ('type', ctypes.c_uint), @@ -68,7 +75,7 @@ class M68KOpSize(ctypes.Structure): def get(a): return copy.deepcopy(type, size) - + class CsM68K(ctypes.Structure): M68K_OPERAND_COUNT = 4 _fields_ = ( diff --git a/bindings/python/capstone/m68k_const.py b/bindings/python/capstone/m68k_const.py index 1d183491..21878071 100644 --- a/bindings/python/capstone/m68k_const.py +++ b/bindings/python/capstone/m68k_const.py @@ -80,9 +80,10 @@ M68K_OP_INVALID = 0 M68K_OP_REG = 1 M68K_OP_IMM = 2 M68K_OP_MEM = 3 -M68K_OP_FP = 4 -M68K_OP_REG_BITS = 5 -M68K_OP_REG_PAIR = 6 +M68K_OP_FP_SINGLE = 4 +M68K_OP_FP_DOUBLE = 5 +M68K_OP_REG_BITS = 6 +M68K_OP_REG_PAIR = 7 M68K_CPU_SIZE_NONE = 0 M68K_CPU_SIZE_BYTE = 1