Method: FFI::Pointer#write

Defined in:
lib/ffi/pointer.rb

#write(type, value) ⇒ nil

Write value of type type to pointer’s content

Same as:

ptr.put(type, 0)

Parameters:

  • type (Symbol, Type)

    of data to read

  • value (Object)

    to write

Returns:

  • (nil)


163
164
165
# File 'lib/ffi/pointer.rb', line 163

def write(type, value)
  put(type, 0, value)
end