On 12 Sep, 21:39, Joel VanderWerf [email protected] wrote:
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
Yes, I can do both Data_Wrap_Struct for other structs in the same
library, and create “instances” of the struct in question. The struct
is defined in a lib that I only have as a binary so I cannot
experiment with the source.
I have tried both with Data_Make_Struct and with a construct I found
in a blog post:
struct_name* s = (struct_name*)malloc(sizeof(struct_name));
obj = Data_Wrap_Struct(klass, 0, terminate, s);
Both result in the same compile message:
invalid application of sizeof to incomplete type s
The struct contains arrays of pointers to other structs so my guess is
that it has something to do with that the compiler cannot figure out a
definitive size to use for the struct. If that is the case I have no
idea how to work around that.
Thankful for any input.