Subject:
[ruby-ffi] Re: Iterating a linked list
From:
Navaneeth KN
Date:
5/7/12 11:48 PM
To:
ruby-ffi@googlegroups.com

Hello,

On Tuesday, 8 May 2012 03:56:20 UTC+5:30, Wayne Meissner wrote:
You've got it almost right - the problem is your mapping of the struct token string fields.

e.g.
  char tag[TOKEN_TAG_MAX];

instead of
  :tag, :string

it should be:

  :tag, [ :char, TOKEN_TAG_MAX ]

Similar for pattern, value1, value2.  Of course, you'll also need to define TOKEN_TAG_MAX and SYMBOL_MAX.

Great. Works now. Thanks a lot for the help.

Navaneeth