Parent

FFI::Struct::ManagedStructConverter

Public Class Methods

new(struct_class) click to toggle source

@param [Struct] struct_class

# File lib/ffi/struct.rb, line 199
def initialize(struct_class)
  super(struct_class)

  raise NoMethodError, "release() not implemented for class #{struct_class}" unless struct_class.respond_to? :release
  @method = struct_class.method(:release)
end

Public Instance Methods

from_native(ptr, ctx) click to toggle source

@param [Pointer] ptr @param [nil] ctx @return [Struct]

# File lib/ffi/struct.rb, line 209
def from_native(ptr, ctx)
  struct_class.new(AutoPointer.new(ptr, @method))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.