def copy_in_bytes bytes, len
      data_buffer = LibC.malloc len
      # writes the exact number of bytes, no null byte to terminate string
      data_buffer.write_string bytes, len

      # use libC to call free on the data buffer; earlier versions used an
      # FFI::Function here that called back into Ruby, but Rubinius won't 
      # support that and there are issues with the other runtimes too
      LibXS.xs_msg_init_data @pointer, data_buffer, len, LibC::Free, nil
    end
def copy_in_bytes bytes, len
      data_buffer = LibC.malloc len
      # writes the exact number of bytes, no null byte to terminate string
      data_buffer.write_string bytes, len

      # use libC to call free on the data buffer; earlier versions used an
      # FFI::Function here that called back into Ruby, but Rubinius won't 
      # support that and there are issues with the other runtimes too
      LibXS.xs_msg_init_data @pointer, data_buffer, len, LibC::Free, nil
    end
Makes a copy of +len+ bytes from the ruby string +bytes+. Library
 handles deallocation of the native memory buffer.

 Can only be initialized via #copy_in_string or #copy_in_bytes once.

 @param bytes
 @param length