[squeak-dev] FFI/Alien: Structures with arrrayed fields

Bert Freudenberg bert at freudenbergs.de
Mon Mar 15 13:36:30 UTC 2010


On 15.03.2010, at 14:29, Schwab,Wilhelm K wrote:
> 
> Hello all,
> 
> I am faced with something like the following:
> 
> struct complex { double real; imaginary; };
> struct ugly {
> 	int gratuitousSize;
> 	long importantStuff[64];
> 	complex * moreImportantStuff[64];
> };
> 
> The question is how to explain this to FFI?  The closest things I have found always seem to be byte arrays, so the "third element" in the arrays of #fields is not well-revealed. 

Why not make an ExternalStructure subclass for "complex" and use that in the fields definition for "ugly"?


- Bert -





More information about the Squeak-dev mailing list