Make RTTI for methods more delphi compatible
Original Reporter info from Mantis: PaulIsh
-
Reporter name: Paul Ishenin
Original Reporter info from Mantis: PaulIsh
- Reporter name: Paul Ishenin
Description:
Problem 1) FPC can write arguments in different order than they are declared
Problem 2) FPC does not store a calling convention in the RTTI
In delphi 2010 one can find then next comment regards tkMethod RTTI:
ParamList: array[1..ParamCount] of
record
Flags: TParamFlags;
ParamName: ShortString;
TypeName: ShortString;
end;
ResultType: ShortString; // only if MethodKind = mkFunction
ResultTypeRef: PPTypeInfo; // only if MethodKind = mkFunction
CC: TCallConv;
ParamTypeRefs: array[1..ParamCount] of PPTypeInfo;
MethSig: PProcedureSignature;
MethAttrData: TAttrData;
And TCallConv declaration:
TCallConv = (ccReg, ccCdecl, ccPascal, ccStdCall, ccSafeCall);
As you can notice FPC misses all fields starting from ResultTypeRef.
Mantis conversion info:
- Mantis ID: 14573
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 14508 (#17bd2671)