[squeak-dev] FFI calls to functions that expect pointers to write results into

tim Rowledge tim at rowledge.org
Thu Feb 5 04:06:37 UTC 2015


On 04-02-2015, at 7:27 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> WordArrays hold 32-bit values by definition. That does not sound like a good way to store pointers.

Not so much storing pointers as providing somewhere to be pointed *to* so the ffi call can write answers according to the pointers it passes out.

> 
>> I?m still hoping someone can point me to some readable doc about all this.
>> 
> 
> I can't say that I have ever seen any documentation other than examples in the image.

I can’t say I’ve even found any there, worst luck.

> 
> <OT>
> Is there some reason that you would not just write a plugin for this?
> </OT>

It may well come to that, but at the moment I’m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh?


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Why do we want intelligent terminals when there are so many stupid users?




More information about the Squeak-dev mailing list