<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        > <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">If you have control over the source, try this:</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Well, that recursive definition through pointers still valid in C, right? So it should be supported in Squeak's FFI. :-)</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 19.05.2020 09:52:57 schrieb Tobias Pape <das.linux@gmx.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><br>> On 19.05.2020, at 08:46, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:<br>> <br>> Hi Levente.<br>> <br>> >  Does MyStruct exist when you're writing this method?<br>> <br>> Yes.<br>> <br>> > If yes, is there a refence to that class in ExternalType's StructTypes class variable?<br>> <br>> Yes.<br>> <br>> **<br>> <br>> The issue was that I wanted to make a pointer to the struct I am currently (re-)defining:<br>> <br><br>> struct MyStruct {<br>>    MyStruct *foobar;<br>> };<br><br>If you have control over the source, try this:<br><br>typedef struct s_MyStruct MyStruct;<br>typedef MyStruct* pMyStruct;<br>struct s_MyStruct {<br>      pMyStruct *foobar;<br>};<br><br>-t<br><br><br>> <br>> Works fine when pointing to other structs. Should code generation work for this case? :-)<br>> <br>> Best,<br>> Marcel<br>>> Am 18.05.2020 21:28:49 schrieb Levente Uzonyi <leves@caesar.elte.hu>:<br>>> <br>>> Hi Marcel,<br>>> <br>>> On Mon, 18 May 2020, Marcel Taeumel wrote:<br>>> <br>>> > Hi, there!<br>>> > <br>>> > In the #fields method of a new ExternalStructure, how can I express a pointer to another external structure?<br>>> > <br>>> > First, non-pointer works as expected:<br>>> > ^ #( (other MyStruct) )<br>>> > <br>>> > Second, this just treats it as a void*, which returns a generic ExternalData:<br>>> > ^ #( (other 'MyStruct*') )<br>>> <br>>> This is how it should be written. Does MyStruct exist when you're writing <br>>> this method? If yes, is there a refence to that class in ExternalType's <br>>> StructTypes class variable?<br>>> <br>>> Levente<br>>> <br>>> > <br>>> > Third, this gives me a debugger:<br>>> > ^ #( (other MyStruct *) )<br>>> > <br>>> > :-)<br>>> > <br>>> > Best,<br>>> > Marcel<br>>> > <br>>> ><br>>> <br>> <br><br><br><br></leves@caesar.elte.hu></marcel.taeumel@hpi.de></div></blockquote>
                                        </div></body>