From: Luc Heinrich Date: 2009-01-17T19:31:02+09:00 Subject: Re: [FFI] how to bind to a function with variable number of args On 16 janv. 09, at 18:00, Ollivier Robert wrote: > I'm looking at ruby-ffi 0.2.0 with MRI 1.8.7 (haven't tried with > rubinius yet) and I can get to attach to setproctitle(3) defined like > this: > > void > setproctitle(const char *fmt, ...); This would be defined like this: module LibC extend FFI::Library attach_function : setproctitle, [:string, :varargs], :void end And then used like this: LibC.setproctitle("%d-%d", [:string, "foo", :int, 42]) -- Luc Heinrich - luc@honk-honk.com