Subject: [ruby-ffi] Re: Having trouble with a struct |
From: Qwerty |
Date: 11/5/10 1:02 PM |
To: ruby-ffi |
No, I am out all day, but will report back for you as soon as possible. On Nov 4, 4:32 pm, Wayne Meissner <wmeiss...@gmail.com> wrote:
<qwerty123451...@hotmail.com> wrote:JRuby 1.5 predates ffi-0.6 (which was when pack was added). JRuby trunk should have pack. Did you try it on JRuby without pack? On 5 November 2010 05:13, QwertyIt is 32 bit.
Is there a reason pack doesn't exist in JRuby?
<wmeiss...@gmail.com> wrote:On Nov 3, 11:54 pm, Wayne Meissner<qwerty123451...@hotmail.com> wrote:On 4 November 2010 10:24, Qwerty
1. Open suse 11.3 kernel: 2.6.34.7-0.5-desktop #1 SMP PREEMPT. Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
Is your ruby running as 32bit or 64bit?
2. I tried it with JRuby 1.5.2 and got an error about pack being undefined. I tried the alias packed with no luck. The JRuby ffi gem directory only has 1 file ffi-0.6.3-java/lib/ffi.rb. Are the other files outside this directory? The docs only show the 3 methods defined in that file(Pointer), yet is doesn't complain about FFI::Struct.
All of FFI for JRuby is contained in JRuby itself - the ffi gem is just a shim to satisfy gem dependencies (and occasionally used to patch the API post release).
At least this bug is easily reproducable, so shouldn't be too hard to track down where in StructLayoutBuilder the problem is.