[fpc-devel] Twice stored record RTTI data
Maciej Izak
hnb.code at gmail.com
Wed Mar 2 08:50:45 CET 2016
2016-03-02 7:56 GMT+01:00 Sven Barth <pascaldragon at googlemail.com>:
> 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.
--
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160302/97c9ab28/attachment.html>
More information about the fpc-devel
mailing list