Hi!
I had a problem with the following code:
(ByteArray new: 50) integerAt: 1 put: 7 size: 4 signed: false
why?
Because on my fresh gentoo linux, I did not have libffi installed. That leads me to my question: why is ffi used for the above code? I thougt 'ffi' stands for 'foreign function interface', and is slow and should be avoided. Why does something 'simple' like a ByteArray need ffi?
Regards, Markus
On Tue, 4 Feb 2003, Markus Fritsche wrote:
(ByteArray new: 50) integerAt: 1 put: 7 size: 4 signed: false
Because on my fresh gentoo linux, I did not have libffi installed. That leads me to my question: why is ffi used for the above code? I thougt 'ffi' stands for 'foreign function interface', and is slow and should be avoided. Why does something 'simple' like a ByteArray need ffi?
Markus,
That got me at first too. You need to look in the 'platform independent' protocol instead of the 'external access' protocol. For example, use
(ByteArray new: 50) unsignedLongAt: 1 put: 7 bigEndian: false
Cheers, Avi
squeak-dev@lists.squeakfoundation.org