rbdasm/dasm.c
//
// Sets the disassembler mode, either 16 or 32 bits.
//
Sets the disassembler mode, either 16 or 32 bits.
Sets the disassembler mode either 16 or 32 bits .
static VALUE dasm_set_mode(VALUE self, VALUE bits)
{
	PDASM_OBJECT obj;
	int          val = FIX2INT(bits);
	rb_dasm_cast(self, obj);
	switch (val)
	{
		case 32: obj->mode = MODE_32; break;
		case 16: obj->mode = MODE_16; break;
		default: rb_raise(rb_eArgError, "Invalid disassembler mode (must be 16 or 32)"); break;
	}
	return Qtrue;
}
static VALUE dasm_set_mode ( VALUE self , VALUE bits ) { PDASM_OBJECT obj ; int val = FIX2INT ( bits ) ; rb_dasm_cast ( self , obj ) ; switch ( val ) { case 32 : obj -> mode = MODE_32 ; break ; case 16 : obj -> mode = MODE_16 ; break ; default : rb_raise ( rb_eArgError , " " ) ; break ; } return Qtrue ; }
Sets the disassembler mode, either 16 or 32 bits.
Sets the disassembler mode either 16 or 32 bits .