Browse Source

Fix compilation with 2.6.x series.

rtl/inc/objpas.inc:
  * IsRefCounted: return False for 2.6.x series
  * RefCountOffset: return 0 for 2.6.x series

git-svn-id: branches/svenbarth/arc@28907 -
svenbarth 10 years ago
parent
commit
c085b1bdcf
1 changed files with 8 additions and 0 deletions
  1. 8 0
      rtl/inc/objpas.inc

+ 8 - 0
rtl/inc/objpas.inc

@@ -1017,12 +1017,20 @@
 
 
       function TObject.IsRefCounted: Boolean;
       function TObject.IsRefCounted: Boolean;
         begin
         begin
+          {$ifdef VER2_6}
+          Result := False;
+          {$else}
           Result := PVmt(Self.ClassType)^.vRefCountOfs > 0;
           Result := PVmt(Self.ClassType)^.vRefCountOfs > 0;
+          {$endif}
         end;
         end;
 
 
       function TObject.RefCountOffset: LongInt;
       function TObject.RefCountOffset: LongInt;
         begin
         begin
+          {$ifdef VER2_6}
+          Result := 0;
+          {$else}
           Result := PVmt(Self.ClassType)^.vRefCountOfs;
           Result := PVmt(Self.ClassType)^.vRefCountOfs;
+          {$endif}
         end;
         end;