[fpc-devel] Improved RTTI compromise
pascaldragon at googlemail.com
Wed Dec 7 11:22:39 CET 2016
Am 07.12.2016 08:50 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
> 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
>> 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
> What is needed is an API that gives you the info contained in the
That's what the RTTI unit is there for. It provides a higher level API to
the type information than typinfo does.
>> or second option:
>> compiler hinting directive "experimental" for TypInfo.TAttributeData.
>> 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.
I've now added that to the list of my near term projects, together with
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel