|
@@ -99,13 +99,19 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
function RTTIRefCountOffset(TypeInfo: Pointer): SizeInt;
|
|
function RTTIRefCountOffset(TypeInfo: Pointer): SizeInt;
|
|
|
|
+{$ifndef VER2_6}
|
|
var
|
|
var
|
|
info: PRecordInfo;
|
|
info: PRecordInfo;
|
|
refcount: PSizeInt;
|
|
refcount: PSizeInt;
|
|
|
|
+{$endif}
|
|
begin
|
|
begin
|
|
|
|
+{$ifdef VER2_6}
|
|
|
|
+ Result:=0;
|
|
|
|
+{$else}
|
|
info:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
|
|
info:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
|
|
refcount:=PSizeInt(Pointer(info)+SizeOf(TRecordInfo)+info^.Count*SizeOf(TRecordElement));
|
|
refcount:=PSizeInt(Pointer(info)+SizeOf(TRecordInfo)+info^.Count*SizeOf(TRecordElement));
|
|
Result:=refcount^;
|
|
Result:=refcount^;
|
|
|
|
+{$endif}
|
|
end;
|
|
end;
|
|
|
|
|
|
{ if you modify this procedure, fpc_copy must be probably modified as well }
|
|
{ if you modify this procedure, fpc_copy must be probably modified as well }
|