> I don't understand. All BoxedFloat have 8 bytes, that's why they are called > BoxedFloat64. There are no 4-bytes floats in Pharo. Even in 32 bits.
I have some code that involve FFI and floats that was working before Spur. I got the error mentioned by Alex. Defining this pointer method gives a weird behavior. It would be great to have this fixed. Alexandre > > 2016-02-12 18:06 GMT+01:00 Esteban Lorenzano <esteba...@gmail.com>: > >> On 12 Feb 2016, at 17:50, Aliaksei Syrel <alex.sy...@gmail.com> wrote: >> >> On Fri, Feb 12, 2016 at 5:45 PM, Esteban Lorenzano <esteba...@gmail.com> >> wrote: >> Float>>#pointer >> ^ (ByteArray new: FFIExternalType pointerSize) >> floatAt: 1 put: self; >> yourself >> >> Yes it does the trick :) Thanks! > > yes and no (I made a mistake): that works because incidentally pointers and > floats have same size (4 bytes)… but can happen that it is not (doubles have > 8 bytes)… but is ok for now :) > I will fix it correctly next week. > > Esteban > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.