On Thu, 14 May 2009 16:59:18 -0400
Timothy Wall <twal...@dev.java.net> wrote:
bit fields are packed in a compiler-specific manner, but are usually
packed together in integer-sized chunks.
you can double check the offsets of your structure's fields by using
gcc's offsetof built-in or printing the difference between the field
address and the structure base address.
keep checking your field mappings until the structures have the same
size; alternatively, if you don't actually need to access the
structure's contents, you can just make a single byte[] field of the
appropriate size.
Hi Timothy,
Thanks for your continued help! My apologies for the probably basic
questions, but there are so many new things here, I am feeling bit lost.
Now I managed to have same struct sizes, but I get still garbage in it.
So here is a bit more on the context.
The C function is:
f(struct my_struct *s[])
In Java it becomes:
class my_struc extends Structure { ... }
int f(my_struct[] s);
One my problems, that I need to create an array size of which I do not
know. The other is the garbage in it. I don know what should I do?
Thanks
Zsolt