Subject:
Re: [ruby-ffi] Help with array of strings in a struct
From:
DA
Date:
5/18/10 9:21 AM
To:
ruby-ffi@googlegroups.com

On Thu, May 13, 2010 at 11:27 PM, Chuck Remes <cremes.devlist@mac.com> wrote:

> Wow, lots of information here.
>
> Let's try to break it down a bit.
>
> Let's eliminate the #compact call. Without it, can you successfully read and access those members?
>
> Do you know that the read to strings[:len], attributes[:len] should output 337? Is that right or a guess?
>
> You have a lot going on here. Please simplify it or the diagnosis may be wrong.

Hi Chuck, thanks for the reply, and sorry for the info overload, I was
trying to give enough context.

I removed compact, and it still crashed.  I confirmed that the :len
value of 337 was correct.  Then I realized the example from the wiki
was for a char*** pointer, and in my case it was char**.  When I
remove the first "read_pointer()", and called get_array_of_string() on
strings[:val] directly, it worked as expected.

Regards,
Drew