Type:
Class

Description

An FFI closure wrapper, for handling callbacks.

Example

closure = Class.new(Fiddle::Closure) {
  def call
    10
  end
}.new(Fiddle::TYPE_INT, [])
   #=> #<#<Class:0x0000000150d308>:0x0000000150d240>
func = Fiddle::Function.new(closure, [], Fiddle::TYPE_INT)
   #=> #<Fiddle::Function:0x00000001516e58>
func.call
   #=> 10
new

new(ret, args, abi = Fiddle::DEFAULT) Class Public methods Construct a new

2015-04-05 20:17:27
to_i

to_i() Instance Public methods Returns the memory address for this closure

2015-04-05 20:18:42