On 09.12.2016 22:57, Maciej Izak wrote: > Hi, > > thanks Sven, finally we have initial RTTI.pas version on trunk. Let me > start with first serious issue and eventually patch: > > function IsManaged(TypeInfo: PTypeInfo): boolean; > > IsManaged can't work with records because we need know managed fields > count (in Delphi when ManagedFldCount is bigger than 0 it means that > record has managed fields and problem is solved). Two possible (and IMO > correct) solutions: > > 1. I think it's time to new position in "User Changes" wiki page. We can > fix that by new behavior (a more Delphi compatible, more logical, more > proper and a little incompatible with old code, but the risk is > minimal): ManagedFldCount should be fixed/corrected as mentioned in > http://bugs.freepascal.org/view.php?id=29767 (so it should count *real* > managed field as the name "ManagedFldCount" suggests. Otherwise we can't > implement this function. Btw. old behavior for ManagedFldCount will be > not usefully anymore with RTTI module/improved TypInfo for counting all > fields.
We rename ManagedFldCount to TotalFieldCount, add a field ManagedFieldCount and a property ManagedFldCount that returns TotalFieldCount for backwards compatibility (and maybe marked as deprecated). Regards, Sven _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel