2016-12-12 13:32 GMT+01:00 Maciej Izak <hnb.c...@gmail.com>: > Status of #31102 is unclear. I need clear response about ManagedFldCount > to decide how to do it - as part of FPC or NewPascal or some mixed way to > keep compatibility as much as possible (in NewPascal for sure I will > correct ManagedFldCount, current value of ManagedFldCount and form of > ManagedFields is unacceptable).
My more complex proposition from point 2. Full backward compatible... Fair enough, ready for Management Operators + fix for Initialize/FinalizeArray: === code begin === type PPRecInitTable = ^PRecInitTable; PRecInitTable = TRecInitTable; TRecInitTable = packed record Size: Longint; Terminator: Pointer; ManagedFieldCount: Longint; { ManagedFields: array[0..ManagedFieldCount - 1] of TManagedField; } end; TRecordTypeField = packed record Field: TManagedField; // :\ a little redundant info (we have this info also in TotalFields, but we need to deal with $RTTI EXPLICIT) Flags: Byte; // visibility Name: ShortString; end; TTypeData = ... { tkRecord } property ManagedFldCount: Integer read GetManagedFldCount; deprecated 'Use TotalFieldCount'; // return TotalFieldCount ... tkRecord: ( RecSize: Integer; RecInitTable: PPRecInitTable; // here is accessible ManagedFieldCount and ManagedFields TotalFieldCount: Integer; {TotalFields: array[0..TotalFieldCount - 1] of TManagedField; RecFldCnt: Integer; // for $RTTI EXPLICIT ... FIELDS RecFields: array[0..RecFldCnt - 1] of TRecordTypeField}); === code end === So merge for PART 2 of Management Operators might be not bad idea: https://github.com/maciej-izak/freepascal/commit/ea23ca80630fae488990dcd4bc62ddc94b18d304 Now I feel that all of my ideas to solve this are expressed. -- Best regards, Maciej Izak
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel