rbdasm/dasm.c
//
// Changes the format that should be used when displaying disassembly strings.
//
Changes the format that should be used when displaying disassembly strings.
Changes the format that should be used when displaying disassembly strings .
static VALUE dasm_set_format(VALUE self, VALUE format)
{
	PDASM_OBJECT obj;
	format = StringValue(format);
	rb_dasm_cast(self, obj);
	if (!strncasecmp(RSTRING(format)->ptr, "intel", 5))
		obj->format = FORMAT_INTEL;
	else if (!strncasecmp(RSTRING(format)->ptr, "att", 3))
		obj->format = FORMAT_ATT;
	else
		rb_raise(rb_eArgError, "Invalid output format (must be intel or att)");
	return Qnil;
}
static VALUE dasm_set_format ( VALUE self , VALUE format ) { PDASM_OBJECT obj ; format = StringValue ( format ) ; rb_dasm_cast ( self , obj ) ; if ( ! strncasecmp ( RSTRING ( format ) -> ptr , " " , 5 ) ) obj -> format = FORMAT_INTEL ; else if ( ! strncasecmp ( RSTRING ( format ) -> ptr , " " , 3 ) ) obj -> format = FORMAT_ATT ; else rb_raise ( rb_eArgError , " " ) ; return Qnil ; }
Changes the format that should be used when displaying disassembly strings.
Changes the format that should be used when displaying disassembly strings .