Subject:
Re: [ruby-ffi] Re: Having trouble with a struct
From:
Wayne Meissner
Date:
11/4/10 6:32 PM
To:
ruby-ffi@googlegroups.com

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, Qwerty <qwerty123451910@hotmail.com> wrote:
> It is 32 bit.
>
> Is there a reason pack doesn't exist in JRuby?
>
> On Nov 3, 11:54 pm, Wayne Meissner <wmeiss...@gmail.com> wrote:
>> On 4 November 2010 10:24, Qwerty <qwerty123451...@hotmail.com> wrote:
>>
>> > 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.