You are not logged in.
Pages: 1
Hi,
we have very important changes for FPC (comes from NewPascal with a few adjustments):
https://github.com/newpascal/freepascal … 9ffaa8a6ad
RTTI layout for records is different and in few cases more Delphi compatible. Maybe not directly compatible... Now is possible to obtain access to *real* managed fields (by RTTI INIT table for records by InitTable field). New layout:
PRecordInfoFull=^TRecordInfoFull;
TRecordInfoFull={$ifdef USE_PACKED} packed{$endif USE_PACKED}
record
InitTable: Pointer; // PRecordInfoInit
Size: Longint;
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
PRecordInfoInit=^TRecordInfoInit;
TRecordInfoInit= {$ifdef USE_PACKED}packed{$endif USE_PACKED}
record
Terminator: Pointer;
Size: Longint;
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
This RTTI is incompatible (yet) with NewPascal. I need to merge this in proper way. In NewPascal InitTable/Terminator is placed after Size field.
Anyway more breaking changes is coming... So be aware.
Last edited by hnb (2016-12-14 20:40:44)
best regards,
Maciej Izak
Offline
Sorry but no. The only proper solution is to use {$ifndef VER3_0} (FPC has official support only for latest stable version and for trunk (2.6.x is not officially supported anymore so {$ifndef VER3_0} make sense). Eventually if we like to support somehow 2.6.x we could use {$if FPC_FULLVERSION>30100} instead of {$ifndef VER3_0}.
FPC is open source so IMO we (as mORMot community) don't need to provide support for versions older than 3.0.x...
best regards,
Maciej Izak
Offline
I will inform about all breaking changes in this topic. We have again small update in https://github.com/newpascal/freepascal … 437b3288e1
First post updated (InitTable field)!
best regards,
Maciej Izak
Offline
Sorry but no. The only proper solution is to use {$ifndef VER3_0} (FPC has official support only for latest stable version and for trunk (2.6.x is not officially supported anymore so {$ifndef VER3_0} make sense). Eventually if we like to support somehow 2.6.x we could use {$if FPC_FULLVERSION>30100} instead of {$ifndef VER3_0}.
I know that you are not happy about that but IMO is impossible to put for each change new FPC_HAS_* ... I do what I can best for improved RTTI. Finally we have small steps in right direction.
best regards,
Maciej Izak
Offline
Pages: 1