[squeak-dev] FFI calls to functions that expect pointers to
write results into
tim at rowledge.org
Thu Feb 5 01:48:05 UTC 2015
On 04-02-2015, at 2:34 PM, Levente Uzonyi <leves at elte.hu> wrote:
> For each variable allocate some bytes on the external heap using an ExternalAddress, and wrap into an ExternalData, then pass the ExternalData as the argument. Something like this:
Thanks; I also found X11Display>queryPointer: which does something similar but a tad simpler by just using WordArrays. I think for quick in-and-out calls that should be ok but if there is any chance whatsoever of the pointer sticking around than an external object is going to be quite important. Assuming we don’t want any Earth shattering KaBooms.
I’m still hoping someone can point me to some readable doc about all this.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Do you like me for my brain or my baud?
More information about the Squeak-dev