From: Nit Khair Date: 2008-11-05T00:10:01+09:00 Subject: Re: FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9 Sean O'halpin wrote: > On Tue, Nov 4, 2008 at 2:38 PM, Ken Bloom wrote: > > module NCursesFFI > extend FFI::Library > ffi_lib 'ncurses' > attach_function 'clear', [], :int > attach_function 'endwin', [], :int > attach_function 'getch', [], :int > attach_function 'initscr', [], :int > attach_function 'printw', [ :string ], :int > attach_function 'refresh', [], :int > end > Sean, Going by the above, and the samples of structs on the blog, for a medium sized library such as ncurses, there can be some effort in getting this module ready. Will there be some kind of repository of such modules, so we are not duplicating each others effort ? I'd like to also add that the above sample is working on osx 10.5.5/darwin/ppc after a small modification in platform.rb above line 28. ARCH = case CPU.downcase when /i?86|x86|i86pc|powerpc/ "i386" when /amd64|x86_64/ "x86_64" I have added "powerpc" to the first "when". btw, i had a clean gem install. Thanks. -- Posted via http://www.ruby-forum.com/.