<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2016-12-12 13:32 GMT+01:00 Maciej Izak <span dir="ltr"><<a href="mailto:hnb.code@gmail.com" target="_blank">hnb.code@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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).</blockquote></div><br>My more complex proposition from point 2. Full backward compatible... Fair enough, ready for Management Operators + fix for Initialize/FinalizeArray:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">=== code begin ===<br></div><div class="gmail_extra"><div class="gmail_extra">type</div><div class="gmail_extra">  PPRecInitTable = ^PRecInitTable;</div><div class="gmail_extra">  PRecInitTable = TRecInitTable;</div><div class="gmail_extra">  TRecInitTable = packed record </div><div class="gmail_extra">    Size: Longint;</div><div class="gmail_extra">    Terminator: Pointer;</div><div class="gmail_extra">    ManagedFieldCount: Longint;</div><div class="gmail_extra">    { ManagedFields: array[0..ManagedFieldCount - 1] of TManagedField; }</div><div class="gmail_extra">  end;</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">  TRecordTypeField = packed record</div><div class="gmail_extra">    Field: TManagedField; // :\ a little redundant info (we have this info also in TotalFields, but we need to deal with $RTTI EXPLICIT)</div><div class="gmail_extra">    Flags: Byte; // visibility</div><div class="gmail_extra">    Name: ShortString;</div><div class="gmail_extra">  end;</div><div class="gmail_extra"><br></div><div class="gmail_extra">  TTypeData =<br></div></div></div><div class="gmail_extra">...</div><div class="gmail_extra">        { tkRecord }</div><div class="gmail_extra">        property ManagedFldCount: Integer read GetManagedFldCount;  deprecated 'Use TotalFieldCount'; // return TotalFieldCount</div><div class="gmail_extra">...</div><div class="gmail_extra">      tkRecord: (</div><div class="gmail_extra">        RecSize: Integer;</div><div class="gmail_extra">        RecInitTable: PPRecInitTable; // here is accessible ManagedFieldCount and ManagedFields</div><div class="gmail_extra">        TotalFieldCount: Integer;</div><div class="gmail_extra"><div class="gmail_extra">       {TotalFields: array[0..TotalFieldCount - 1] of TManagedField;</div><div class="gmail_extra">        RecFldCnt: Integer; // for $RTTI EXPLICIT ... FIELDS</div><div class="gmail_extra">        RecFields: array[0..RecFldCnt - 1] of TRecordTypeField});</div></div><div>=== code end ===<br></div><div><br></div><div>So merge for PART 2 of Management Operators might be not bad idea:</div><div><br></div><div><a href="https://github.com/maciej-izak/freepascal/commit/ea23ca80630fae488990dcd4bc62ddc94b18d304">https://github.com/maciej-izak/freepascal/commit/ea23ca80630fae488990dcd4bc62ddc94b18d304</a><br></div><div><br></div><div>Now I feel that all of my ideas to solve this are expressed.</div><div><br></div>-- <br><div class="gmail-m_1093394613634990336gmail-m_-3760192200009594665gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div>
</div></div>