From: Clifford Heath Date: 2008-11-11T13:47:33+09:00 Subject: Re: [ANN] FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9 Charles Oliver Nutter wrote: > Actually structs are already supported! Sorry if you see this twice, posting difficulties. I'm having a bash at wrapping freetds. This library has a Context struct which contains three callback function pointers. POLS says these should look like this: callback :handle_message, [ :pointer, :pointer, :pointer ], :in # TDSCONTEXT, TSSSOCKET, TDSMESSAGE callback :handle_int, [ :pointer ], :in # void* class Context < FFI:Struct layout \ :locale, :pointer, 0, # TDSLOCALE :parent, :pointer, 4, # void * :msg_handler, :handle_message, 8, # callback(TDSCONTEXT, TDSSOCKET, TDSMESSAGE) :err_handler, :handle_message, 12, # callback(TDSCONTEXT, TDSSOCKET, TDSMESSAGE) :int_handler, :handle_int, 16 # callback(void*) end Am I on the right track, or is this not possible yet? Clifford Heath.