class FFI::VariadicInvoker
def attach(mod, mname)
Attach the invoker to module +mod+ as +mname+
def attach(mod, mname) invoker = self params = "*args" call = "call" mod.module_eval <<-code @@#{mname} = invoker def self.#{mname}(#{params}) @@#{mname}.#{call}(#{params}) end def #{mname}(#{params}) @@#{mname}.#{call}(#{params}) end code invoker end