Subject: [ruby-ffi] struct with dynamic sized char array. |
From: Yannick K |
Date: 4/29/10 4:12 PM |
To: ruby-ffi |
hi,
i have the following struct definition from libattr:
typedef struct attrlist_ent { /* data from attr_list() */
u_int32_t a_valuelen; /* number bytes in value of attr */
char a_name[1]; /* attr name (NULL terminated) */
} attrlist_ent_t;
where a_valuelen actually holds the size of a_name.
how should i map this to a string?
regards,
y