From: Charles Oliver Nutter Date: 2008-11-04T04:54:35+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: > Charles Oliver Nutter wrote: >> We (JRuby and Rubinius contributors) designed in the ability to >> specify calling convention for a given library bound through FFI. >> Largely this was needed to support Win32's stdcall, but if Linux/PPC >> has a different convention and libffi supports it, then FFi will too >> (though we may have to add it to the list of accepted conventions). >> >> I'll check on the syntax we're supporting and get back to ya. > > In the body of the module you're binding: > > ffi_convention :stdcall # :default is for normal C convention > > We could add whatever convention Linux/PPC needs. Or, duh, have FFI use the appropriate default convention on the target platform. Either way, it should be simple to deal with. - Charlie