[squeak-dev] FFI | How to declare pointer to external structure in #fields?
Levente Uzonyi
leves at caesar.elte.hu
Mon May 18 19:28:37 UTC 2020
Hi Marcel,
On Mon, 18 May 2020, Marcel Taeumel wrote:
> Hi, there!
>
> In the #fields method of a new ExternalStructure, how can I express a pointer to another external structure?
>
> First, non-pointer works as expected:
> ^ #( (other MyStruct) )
>
> Second, this just treats it as a void*, which returns a generic ExternalData:
> ^ #( (other 'MyStruct*') )
This is how it should be written. Does MyStruct exist when you're writing
this method? If yes, is there a refence to that class in ExternalType's
StructTypes class variable?
Levente
>
> Third, this gives me a debugger:
> ^ #( (other MyStruct *) )
>
> :-)
>
> Best,
> Marcel
>
>
More information about the Squeak-dev
mailing list
|