ffi/ffi — Issue #188: [Feature Request] Allow default arguments for .attach_function
Author: shevegen
Created: 2012-02-01 04:22:59+00:00
State: open

Hello.

It seeems right now you can do this:

require 'ffi'

module HelloWorld

extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function 'puts', [ :string ], :int

end

HelloWorld.puts('Hello, World')

But there is no way to use default arguments when using attach_function.