2009-07-21 20:38:51 +02:00
|
|
|
%apply unsigned char { char n };
|
|
|
|
%apply unsigned char { char offb };
|
|
|
|
%apply unsigned char { char offo };
|
|
|
|
%apply unsigned char { char dtyp };
|
2009-01-19 20:41:24 +01:00
|
|
|
|
2007-10-20 09:03:51 +02:00
|
|
|
%include "ua.hpp"
|
|
|
|
|
2009-07-21 20:38:51 +02:00
|
|
|
%clear (char n);
|
|
|
|
%clear (char offb);
|
|
|
|
%clear (char offo);
|
|
|
|
%clear (char dtyp);
|
|
|
|
|
2007-10-20 09:03:51 +02:00
|
|
|
// Small function to get the global cmd pointer
|
|
|
|
// In Python it returns an insn_t class instance
|
|
|
|
%inline {
|
|
|
|
insn_t * get_current_instruction()
|
|
|
|
{
|
2009-05-23 18:35:50 +02:00
|
|
|
return &cmd;
|
2007-10-20 09:03:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get the nth operand from the insn_t class
|
|
|
|
%inline {
|
|
|
|
op_t *get_instruction_operand(insn_t *ins, int n)
|
|
|
|
{
|
2009-05-23 18:35:50 +02:00
|
|
|
if (!ins)
|
|
|
|
return NULL;
|
|
|
|
return &(ins->Operands[n]);
|
2007-10-20 09:03:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|