|
@@ -484,10 +484,11 @@ end;
|
|
|
var
|
|
var
|
|
|
vmt : PVmt;
|
|
vmt : PVmt;
|
|
|
inittable : pointer;
|
|
inittable : pointer;
|
|
|
|
|
+ Res : ^TRTTIRecordOpOffsetEntry;
|
|
|
{$ifdef FPC_HAS_FEATURE_RTTI}
|
|
{$ifdef FPC_HAS_FEATURE_RTTI}
|
|
|
mopinittable : PRTTIRecordOpOffsetTable;
|
|
mopinittable : PRTTIRecordOpOffsetTable;
|
|
|
{$endif def FPC_HAS_FEATURE_RTTI}
|
|
{$endif def FPC_HAS_FEATURE_RTTI}
|
|
|
- i : longint;
|
|
|
|
|
|
|
+ i : longword;
|
|
|
begin
|
|
begin
|
|
|
{ the size is saved at offset 0 }
|
|
{ the size is saved at offset 0 }
|
|
|
fillchar(instance^, InstanceSize, 0);
|
|
fillchar(instance^, InstanceSize, 0);
|
|
@@ -522,8 +523,14 @@ end;
|
|
|
{$push}
|
|
{$push}
|
|
|
{ ensure that no range check errors pop up with the [0..0] array }
|
|
{ ensure that no range check errors pop up with the [0..0] array }
|
|
|
{$R-}
|
|
{$R-}
|
|
|
- for i:=0 to mopinittable^.Count-1 do
|
|
|
|
|
- TRTTIRecVarOp(mopinittable^.Entries[i].ManagmentOperator)(PByte(Instance)+mopinittable^.Entries[i].FieldOffset);
|
|
|
|
|
|
|
+ i:=mopinittable^.Count;
|
|
|
|
|
+ Res:=@mopinittable^.Entries[0];
|
|
|
|
|
+ while i>0 do
|
|
|
|
|
+ begin
|
|
|
|
|
+ TRTTIRecVarOp(Res^.ManagmentOperator)(PByte(Instance)+Res^.FieldOffset);
|
|
|
|
|
+ inc(Res);
|
|
|
|
|
+ dec(i);
|
|
|
|
|
+ end;
|
|
|
{$pop}
|
|
{$pop}
|
|
|
end;
|
|
end;
|
|
|
end;
|
|
end;
|