class FFI::StructByReference

def to_native(value, ctx)

Returns:
  • (AbstractMemory) - Pointer on +value+.

Parameters:
  • ctx (nil) --
  • value (nil, Struct) --
def to_native(value, ctx)
  return Pointer::NULL if value.nil?
  unless @struct_class === value
    raise TypeError, "wrong argument type #{value.class} (expected #{@struct_class})"
  end
  value.pointer
end