Update of /cvsroot/gexperts/gexperts/unstable/Comps
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14158/Comps
Modified Files:
GpLists.pas
Log Message:
Fix Delphi 6 compiler error using IFDEF
Index: GpLists.pas
===================================================================
RCS file: /cvsroot/gexperts/gexperts/unstable/Comps/GpLists.pas,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GpLists.pas 19 Jan 2007 05:11:24 -0000 1.3
+++ GpLists.pas 19 Jan 2007 07:53:44 -0000 1.4
@@ -104,6 +104,12 @@
interface
+{$IFDEF CONDITIONALEXPRESSIONS}
+ {$IF (RTLVersion >= 15)} // Delphi 7.0 or newer
+ {$DEFINE D7PLUS}
+ {$IFEND}
+{$ENDIF}
+
uses
Classes,
Contnrs,
@@ -222,7 +228,6 @@
property Text: string read GetText write SetText;
end; { TGpIntegerList }
-(*
TGpInt64List = class;
{:TGpInt64List enumerator.
@@ -303,7 +308,6 @@
property Sorted: boolean read ilSorted write SetSorted;
property Text: string read GetText write SetText;
end; { TGpInt64List }
-*)
{:Integer list where each integer is accompanied with an object.
@since 2003-06-09
@@ -334,7 +338,6 @@
property Objects[idxObject: integer]: TObject read GetObject write SetObject;
end; { TGpIntegerObjectList }
-(*
{:Int64 list where each integer is accompanied with an object.
@since 2006-09-20
}
@@ -363,7 +366,6 @@
procedure SaveToStream(stream: TStream); override;
property Objects[idxObject: integer]: TObject read GetObject write SetObject;
end; { TGpInt64ObjectList }
-*)
{:String list where each item has associated counter (stored in the Objects)
property.
@@ -622,12 +624,10 @@
Result := IntegerCompare(List[idx1], List[idx2]);
end; { IntegerListCompare }
-(*
function Int64ListCompare(List: TGpInt64List; idx1, idx2: integer): integer;
begin
Result := Int64Compare(List[idx1], List[idx2]);
end; { Int64ListCompare }
-*)
{ TGpInt64 }
@@ -1062,7 +1062,6 @@
QuickSort(0, Count - 1, IntegerListCompare);
end; { TGpIntegerList.Sort }
-(*
{ TGpInt64ListEnumerator }
constructor TGpInt64ListEnumerator.Create(aList: TGpInt64List);
@@ -1445,12 +1444,16 @@
{:Restores the list dumped by the Dump method.
@returns Pointer to the byte immediately after the end of dumped data.
@since 2006-09-20
-}
+}
+
+type
+ PInteger64 = ^Int64; // Workaround for Delphi 6 "Internal error: URW699" below
+
function TGpInt64List.Restore(baseAddr: pointer): pointer;
var
iList : integer;
numItems: integer;
- pList : PLargeInteger;
+ pList : {$IFNDEF D7PLUS} PInteger64 {$ELSE} PLargeInteger {$ENDIF};
begin
pList := baseAddr;
numItems := integer(pList^);
@@ -1524,7 +1527,6 @@
if not Sorted and (Count > 1) then
QuickSort(0, Count - 1, Int64ListCompare);
end; { TGpInt64List.Sort }
-*)
constructor TGpIntegerObjectList.Create(ownsObjects: boolean);
begin
@@ -1695,7 +1697,6 @@
iolObjects[idxObject] := value;
end; { TGpIntegerObjectList.SetObject }
-(*
{ TGpInt64ObjectList }
constructor TGpInt64ObjectList.Create(ownsObjects: boolean);
@@ -1867,7 +1868,6 @@
begin
iolObjects[idxObject] := value;
end; { TGpInt64ObjectList.SetObject }
-*)
{ TGpCountedStringList }
@@ -2607,3 +2607,4 @@
end.
+
|