Hello all, I have some classes that started out as place holders to allow me to load code I wrote for Dolphin, and over time, have become almost useful :) One thing I really needed was a contiguous array of doubles; there is a LOT of code that uses them. Enter ExternalArray with many subclasses, most of which translate #at: and #at:put: into appropriate methods of ByteArray (#doubleAt:put:, etc.).
The numbers end up being stored in a byte array, so the indexing looks at position and element size. Access is very slow, but most of the time, I simply allocate a block of memory (e.g. create a byte array, which is fast) and then pass it to an external C/C++ function to do the real work. The passing is the subject of this message. I end up (for FFI) describing the arguments as void*, passing the byte array to the function. Is there a way to tell FFI that an instance of DOUBLEArray can be treated as a double*? Bill
