<p>Am 24.03.2017 19:55 schrieb "Michael Van Canneyt" <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>>:<br>
><br>
><br>
><br>
> On Fri, 24 Mar 2017, African Wild Dog wrote:<br>
><br>
>> Hello,<br>
>><br>
>> I need to write a code compatilble with both free pascal and delphi using<br>
>> the old style RTTI.<br>
>> What are the diferences between delphi's and free pascal's approach/types?<br>
>><br>
>> I took a look at delphi's and fpc's TypInfo unit and it looks like the<br>
>> types/functions are compatible.<br>
><br>
><br>
> They are. There is one dereference on Delphi which is not present in fpc,<br>
> although in fpc trunk, this additional dereference is there. If you use the<br>
> standard functions you should not notice this.</p>
<p>The binary data of RTTI added before 3.1.1 now has the double indirection, but the Delphi-compatible "field" names have only a single indirection for backwards compatibility (they are properties to the double indirection fields). RTTI data added in 3.1.1 only has the double indirection.<br>
So this difference needs to be kept in mind and will always result in ifdefs for RTTI code that handles both Delphi and FPC.</p>
<p>Regards,<br>
Sven</p>