[fpc-devel] TypeInfo RTTI / possible inconsistency
Sven Barth
pascaldragon at googlemail.com
Wed May 19 22:13:35 CEST 2021
Am 18.05.2021 um 15:50 schrieb Martin Frb via fpc-devel:
> On 18/05/2021 15:24, Martin Frb via fpc-devel wrote:
>> I was looking at TypeInfo (based on 3.2.2rc)
>>
>> line 632 unit TypInfo
>>> tkMethod:
>>> ....
>>> followed by
>>> ResultType : ShortString // for mkFunction,
>>> mkClassFunction only
>>> ResultTypeRef : PPTypeInfo; // for mkFunction,
>>> mkClassFunction only
>>> CC : TCallConv;
>>> ParamTypeRefs : array[1..ParamCount] of PPTypeInfo;}
>>> );
>>
>> To find out about alignment (for any target which needs alignment), I
>> looked through other code:
>
> And just to confirm, if anyone knows....
>
> Those are indeed PPTypeInfo ? (even in 3.0?)
>
> Since a lot of other TypeInfos are:
> {$ifdef ver3_0}
> {$define TypeInfoPtr := PTypeInfo}
> {$else}
> {$define TypeInfoPtr := PPTypeInfo}
> {$endif}
>
> Rtti.pas in 3.0.0 seems to tread them as PPTypeInfo. So that would
> indicate they indeed are PPTypeInfo.
They were only introduced in 3.0.0, thus they were introduced as
PPTypeInfo right away as that is required for dynamic packages on
Windows to work correctly (as Michael mentioned).
Regards,
Sven
More information about the fpc-devel
mailing list