Am 02.03.2016 08:50 schrieb "Maciej Izak" <[email protected]>: > > > 2016-03-02 7:56 GMT+01:00 Sven Barth <[email protected]>: >> >> IT table is a subset that only includes managed fields while the RTTI table also contains unmanaged ones. This way the helpers don't need to work through larger records that only contain primitive types. >> If that isn't the case then *that* is a bug. > > Arghhhh, to much Delphi :\. All confusion is related to my Delphi knowledge. I took it as fact also for FPC. > > For Delphi even for XE2 in record case there is no difference between RTTI and INIT table. RTTI table for record does not contains any information about unmanaged fields -,- . Just pure copy of INIT table. (Maybe in Delphi exist only INIT table in that case) > > Output for attached example FPC is 2, output for Delphi is 1. In Delphi rich RTTI information about unmanaged fields for records is stored in different place. > > === example === > type > TR = record > x: integer; > s: string; > end; > > begin > WriteLn(PTypeData(GetTypeData(typeinfo(TR)))^.ManagedFldCount); > readln; > end. >
One could say that in case of FPC the name "ManagedFldCount" isn't quite correct ;) Regards, Sven
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
