<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hi Tom,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 16, 2020 at 1:12 AM Beckmann, Tom <<a href="mailto:Tom.Beckmann@student.hpi.uni-potsdam.de">Tom.Beckmann@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
for ExternalStructure fields definitions I worked around this by exploding the array, as in<br>
#((str1 'char') (str2 'char') (str3 'char') (str4 'char') (str5 'char'))<br>
<br>
The same works for other ExternalTypes like Foo of course.<br>
<br>
I also have an experimental set of changes that adds an ExternalArrayType to support this, however it still has some untested corner cases. I'll investigate getting it merged to FFI soon.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:large">It is much better to have a new facility "out in the wild" available to look at b others and test than it is to sit on something until it is perfect.  Please do release it asap.  Then we can all collaborate on writing tests for it (we would need tests in the FFI test suite), reviewing the code, etc.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Best,<br>
Tom<br>
________________________________________<br>
From: Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> on behalf of Taeumel, Marcel<br>
Sent: Wednesday, September 16, 2020 9:58:45 AM<br>
To: squeak-dev<br>
Subject: Re: [squeak-dev] FFI type for 'char[12]'?<br>
<br>
Hi Tony,<br>
<br>
such container types are still work-in-progress. :-/ For char[12], you can either use "string" or "char*", I suppose. "Foo x[5]" can be expressed through ExternalData, too, which would be "Foo*".<br>
<br>
Best,<br>
Marcel<br>
<br>
Am 16.09.2020 09:49:20 schrieb Tony Garnock-Jones <<a href="mailto:tonyg@leastfixedpoint.com" target="_blank">tonyg@leastfixedpoint.com</a>>:<br>
<br>
Hi all,<br>
<br>
Is there some way in the FFI to specify that an ExternalStructure has a<br>
member whose type is like 'char x[12]'?<br>
<br>
Similarly, given some ExternalStructure Foo, can I have another<br>
structure that has a member like 'Foo x[5]'?<br>
<br>
Tony<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>