Method: Fiddle::Pointer.write

Defined in:
pointer.c

.Fiddle::Pointer.write(address, str) ⇒ Object

Write bytes in str to the location pointed to by address.



827
828
829
830
831
832
# File 'pointer.c', line 827

static VALUE
rb_fiddle_ptr_write_mem(VALUE klass, VALUE addr, VALUE str)
{
    memcpy(NUM2PTR(addr), StringValuePtr(str), RSTRING_LEN(str));
    return str;
}