[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More FFI Questions

I've run into this problem several times. Currently, there is no
elegant way to define array fields in record definitions. I recall
hearing it mentioned that this will be fixed in MACL 2.0.

For now, I think you have to put in your 100 occurencs of ostype.
Since the various %get-xxx functions take an optional offset parameter,
you won't have to index the elements by field name. To get the address
of the 0th element, add the field offset (which you can get from the
field-info function) to the record pointer.

Now that you've gotten me thinking about this, it should be pretty
easy to write some macro's to simplify all this. Email me back and
I'll let you know what I come up with.