[Cuis-dev] FFI example
Vanessa Freudenberg
vanessa at codefrau.net
Sun Sep 29 18:29:55 PDT 2024
And, defining a method myself works fine:
getenv: var
<cdecl: char* 'getenv' (char*) module: 'libSystem.dylib'>
^self externalCallFailed
And then
MyClass getenv: 'HOME'
returns
'/Users/vanessa' .
There really isn't much more to it.
Vanessa
On Sun, Sep 29, 2024 at 6:26 PM Vanessa Freudenberg <vanessa at codefrau.net>
wrote:
> I just loaded the "Tests-FFI" package and it works.
>
> And you can e.g. run
>
> FFITestLibrary new ffiTestFloats: 3 with: 4
>
> which returns 7.0 because the plugin happens to implement
> "ffiTestFloats()" as returning the sum of its two arguments.
>
> Vanessa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240929/7a4568b3/attachment-0001.htm>
More information about the Cuis-dev
mailing list