Fixed python bindings to align with struct changes

This commit is contained in:
Inokentiy Babushkin 2016-05-12 08:50:05 +02:00
parent bd139c663a
commit 1b0779b97a
2 changed files with 13 additions and 5 deletions

View File

@ -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_ = (

View File

@ -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