[fpc-pascal] Delphi RTTI vs Free Pascal RTTI
African Wild Dog
paintedlycaon at gmail.com
Thu Mar 30 08:17:49 CEST 2017
2017-03-25 5:40 GMT-03:00 Sven Barth via fpc-pascal <
fpc-pascal at lists.freepascal.org>:
> Am 24.03.2017 19:55 schrieb "Michael Van Canneyt" <michael at 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
> >> the old style RTTI.
> >> What are the diferences between delphi's and free pascal's
> >> 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
> > 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.
Thanks for the clarifications.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal