Subject:
[ruby-ffi] Re: Reading struct elements returning incorrect values
From:
Navaneeth KN
Date:
6/24/12 1:09 AM
To:
ruby-ffi@googlegroups.com

Hello,

On Saturday, 16 June 2012 11:57:49 UTC+5:30, Wayne Meissner wrote:
Shouldn't this line:

 item = VarnamLibrary::Token.new(ptr)

be:

 item = VarnamLibrary::Token.new(tok)

i.e. cast the return value from varray_get() to a Token struct?

Yes. That was a small mistake. Thanks for pointing it out. It works well now.

Thanks
Navaneeth