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

David T. Lewis lewis at mail.msen.com
Thu Feb 5 03:27:52 UTC 2015

On Wed, Feb 04, 2015 at 05:48:05PM -0800, tim Rowledge wrote:
> 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.

WordArrays hold 32-bit values by definition. That does not sound like a good way to store pointers.

> 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.

Is there some reason that you would not just write a plugin for this?


More information about the Squeak-dev mailing list