[squeak-dev] FFI (Plugin) | Question about multi-dimensional arrays (e.g., char**, int**, void*****...)

Jakob Reschke forums.jakob at resfarm.de
Mon Jun 15 12:24:47 UTC 2020


Marcel Taeumel <marcel.taeumel at hpi.de> schrieb am Mo., 15. Juni 2020, 13:22:

>
> - Accept type names such as "int **" or "int[][]" in FFI-call specs and
> struct-field spec
>

One further note: int[][] is not valid C in parameter types. Only the first
[] can be without length, and is equivalent to a pointer. So char*argv[] is
the same as char**argv. Valid parameter type examples: int a[][3], int
b[][2][3]. These are like int(*a)[3] and int(*b)[2][3] if I am not mistaken.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200615/b521d449/attachment.html>


More information about the Squeak-dev mailing list