On 5/ago/2005, at 09:02, James Bielman wrote:
My guess was that this had something to do with alignment of the struct, but I have to admit that my knowledge about memory alignment is pretty much nil. zero.
Indeed this is a bug, but I probably won't have time to look at it for a little while...
Probably foreign structure types need to sum the alignment of each member to calculate the total alignment of the structure (and I think there are some wrinkles with double float alignment on Darwin also).
Yeah, the structures are being aligned as if they were pointers. Now, I don't know how the structure is supposed to be aligned. I'm told that this depends on the ABI so I'm checking out the psABI docs. Should also look into what the various open-source lisps do.
If structure alignment is the same regardless of the structure type, I suppose we could add a new operator to CFFI-SYS to tells this, but I don't know if this assumption is true at all...
I have added this to my list of known issues. :-)