Am 24.03.2017 19:55 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: > > > > On Fri, 24 Mar 2017, African Wild Dog wrote: > >> Hello, >> >> I need to write a code compatilble with both free pascal and delphi using >> the old style RTTI. >> What are the diferences between delphi's and free pascal's approach/types? >> >> I took a look at delphi's and fpc's TypInfo unit and it looks like the >> types/functions are compatible. > > > They are. There is one dereference on Delphi which is not present in fpc, > although in fpc trunk, this additional dereference is there. If you use the > standard functions you should not notice this.
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. So this difference needs to be kept in mind and will always result in ifdefs for RTTI code that handles both Delphi and FPC. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal