[squeak-dev] Passing array of float from Squeak to C
Yoshiki Ohshima
yoshiki at vpri.org
Fri Feb 20 18:40:17 UTC 2009
At Fri, 20 Feb 2009 03:11:20 -0800 (PST),
Ang Beepeng wrote:
>
>
> I'm facing problem to pass a float array over to C, to create a plugin.
>
> Previously, I use variableWordSubclass: to create a class to store floats,
> in an array. It works fine, as floats are stored as words.
> Now that I need to have an instance variable, I use variableSubclass: to
> store floats. It seems like floats are being stored as object in the array
> this time. The VM crashes when I try to use to same method to access to the
> float array.
To get a Float object and use the value in C, use #floatValueOf:.
Look at the senders of the method for examples.
-- Yoshiki
More information about the Squeak-dev
mailing list
|