[squeak-dev] FFI syntax

Eliot Miranda eliot.miranda at gmail.com
Wed Oct 15 17:18:04 UTC 2014


Hi Annick,

On Wed, Oct 15, 2014 at 7:57 AM, Annick Fron <list at afceurope.com> wrote:

> What is the syntax to describe an external structure with an array of int
> of size 6 ?
>
> I know only the syntax
>
> fields
> ^#(
> (param1 ‘long’)
> (param2 ‘long’)
> (param3 ‘long’)
> (param4 ‘long’)
> (param5 ‘long’)
> (param6 ‘long’)
> )
>

Hmm.  Good question.  It seems you can write

fields
"IAXCallStateEvent defineFields"
^#(
(type 'long')
(callNo 'long')
(state 'long')
(format 'long')
(vformat 'long')
(remote 'char[256]')
(remoteName 'char[256]')
(local 'char[256]')
(localContext 'char[256]')
)

But as a community we really need to document the FFI more thoroughly :-/


>
> Annick
>



-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141015/93b20f22/attachment.htm


More information about the Squeak-dev mailing list