# File lib/ffi/struct.rb, line 164definitialize(struct_class)
super(struct_class)
raiseNoMethodError, "release() not implemented for class #{struct_class}"unlessstruct_class.respond_to?:release@method = struct_class.method(:release)
end
Public Instance Methods
from_native(ptr, ctx)click to toggle source
# File lib/ffi/struct.rb, line 171deffrom_native(ptr, ctx)
struct_class.new(AutoPointer.new(ptr, @method))
end