[fpc-devel] Improved RTTI compromise

Michael Van Canneyt michael at freepascal.org
Wed Dec 7 08:49:58 CET 2016



On Tue, 6 Dec 2016, Maciej Izak wrote:

> 2016-12-06 17:46 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:
>
>> The Delphi TypInfo unit also exposes the attributes.
>
>
> My message was unclear - I mean that we can hide incompatible part of
> TypInfo. Type TAttributeData is located in TypInfo (sooner or later that
> part of TypInfo will be corrected - but IIRC for that "Invoke" function is
> needed). RTTI.pas is rather fine (need to check).

I am not sure this is possible. The structures exposed in the typinfo
interfacee mimic the info the compiler generates in the binary.

If the compiler generates different info than Delphi, you cannot retrieve 
it in a delphi-compatible way.

Trying to generate the exact same information as Delphi is IMHO not the right path.

What is needed is an API that gives you the info contained in the internal structures.

> or second option:
>
> compiler hinting directive "experimental" for TypInfo.TAttributeData. Good
> temporary deal for all (I think)...
>
> anyway any option is much better perspective than ignoring RTTI.pas for
> long long long time...

No-one is ignoring RTII. I have contacted Joost on multiple occasions to
merge his work into trunk. I get a lot of questions about it. But I cannot
do the work myself. If I could, I would. I am waiting for the attributes
since a long time.

Michael.



More information about the fpc-devel mailing list