Am 31.08.2019 um 18:24 schrieb fredvs:
Hello.
Type information contains reference to attribute table
Old behavior: The first field of the data represented by TTypeData is
whatever the sub branch
of the case statement for the type contains.
New behavior: The first field of the data represented by TTypeData is a
reference to
the custom attributes that are attributed to the type, only then the type
specific fields follow.
Reason: Any type can have attributes, so it make sense to provide this is
a common
location instead of having to parse the different types.
Remedy:
If you use the records provided by the TypInfo unit no changes should be
necessary (same for the Rtti unit).
If you directly access the binary data you need handle an additional
Pointer field
at the beginning of the TTypeData area and possibly correct the alignment
for platforms that have
strict alignment requirements (e.g. ARM or M68k).
Aaargh, it seems that msegui uses direct access so the second remedy is
needed.
Every advice how to use that remedy, tips where to look, how to do, is, of
course, very welcome.
Just look at the changes:
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/typinfo.pp?r1=42373&r2=42375
If you have code that tries to access the type information you need to
take that field into account.
Same for properties, where especially this one is important:
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/objpas/typinfo.pp?r1=42358&r2=42365
When you iterate from one PPropInfo you need to take that into account
or use the appropriate functions of the TypInfo unit.
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal