Re: [lazarus] Changes for latest fpc-trunk

2005-12-21 Thread Joost van der Sluis
It was less work then I thought.

With this patch Lazarus compiles on fpc 2.1.1 r2020 and up again.

I'm not sure about the fix in controls.pp, though. What should the
default be? And why was it '-1'? 

On Wed, 2005-12-21 at 14:24 +0100, Joost van der Sluis wrote:
 Hi all,
 
 in revision r2020 of fpc the basic-generics support is added. But with
 that patch double identifiers aren't allowed anymore, it seems. 
 
 There were made some changes to the fcl to make it compile again, but
 the same has to be done on Lazarus. For example line 2609 of
 lresources.pp. Stream should be defined as AStream:Tstream
 
 Shall I make a patch for whole lazarus to make it compile on fpc-trunk
 again?
 
 Or does someone else that, or are there any objections?
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl
Index: ide/revision.inc
===
--- ide/revision.inc	(revision 8349)
+++ ide/revision.inc	(working copy)
@@ -1,2 +1,2 @@
 // Created by Svn2RevisionInc
-const RevisionStr = '8129M';
+const RevisionStr = '8349M';
Index: lcl/propertystorage.pas
===
--- lcl/propertystorage.pas	(revision 8349)
+++ lcl/propertystorage.pas	(working copy)
@@ -51,7 +51,7 @@
 function GetStoredValues: TStoredValues;
   protected
 function GetDisplayName: string; override;
-procedure SetDisplayName(const Value: string); override;
+procedure SetDisplayName(const AValue: string); override;
   public
 constructor Create(ACollection: TCollection); override;
 procedure Assign(Source: TPersistent); override;
@@ -74,11 +74,11 @@
   private
 FStorage: TCustomPropertyStorage;
 function GetValue(const AName: string): TStoredValue;
-procedure SetValue(const AName: string; StoredValue: TStoredValue);
+procedure SetValue(const AName: string; AStoredValue: TStoredValue);
 function GetStoredValue(const AName: string): TStoredType;
 procedure SetStoredValue(const AName: string; Value: TStoredType);
 function GetItem(Index: Integer): TStoredValue;
-procedure SetItem(Index: Integer; StoredValue: TStoredValue);
+procedure SetItem(Index: Integer; AStoredValue: TStoredValue);
   public
 constructor Create(AOwner: TPersistent);
 function IndexOf(const AName: string): Integer;
@@ -277,13 +277,13 @@
 Result := FName;
 end;
 
-procedure TStoredValue.SetDisplayName(const Value: string);
+procedure TStoredValue.SetDisplayName(const AValue: string);
 begin
-  if (Value  '') and (AnsiCompareText(Value, FName)  0)
+  if (AValue  '') and (AnsiCompareText(AValue, FName)  0)
   and (Collection is TStoredValues)
   and (TStoredValues(Collection).IndexOf(Value) = 0) then
 raise Exception.Create(SDuplicateString);
-  FName := Value;
+  FName := AValue;
   inherited;
 end;
 
@@ -373,9 +373,9 @@
   Result := TStoredValue(inherited Items[Index]);
 end;
 
-procedure TStoredValues.SetItem(Index: Integer; StoredValue: TStoredValue);
+procedure TStoredValues.SetItem(Index: Integer; AStoredValue: TStoredValue);
 begin
-  inherited SetItem(Index, TCollectionItem(StoredValue));
+  inherited SetItem(Index, TCollectionItem(AStoredValue));
 end;
 
 function TStoredValues.GetStoredValue(const AName: string): TStoredType;
@@ -417,13 +417,13 @@
 Result := Items[I];
 end;
 
-procedure TStoredValues.SetValue(const AName: string; StoredValue: TStoredValue);
+procedure TStoredValues.SetValue(const AName: string; AStoredValue: TStoredValue);
 var
   I: Integer;
 begin
   I := IndexOf(AName);
   if I = 0 then
-Items[I].Assign(StoredValue);
+Items[I].Assign(AStoredValue);
 end;
 
 procedure TStoredValues.SaveValues;
Index: lcl/lresources.pp
===
--- lcl/lresources.pp	(revision 8349)
+++ lcl/lresources.pp	(working copy)
@@ -91,7 +91,7 @@
 procedure SkipSetBody;
 function ReadIntegerContent: integer;
   public
-constructor Create(Stream: TStream; BufSize: Integer); virtual;
+constructor Create(AStream: TStream; BufSize: Integer); virtual;
 destructor Destroy; override;
 
 function NextValue: TValueType; override;
@@ -203,7 +203,7 @@
   LFMPositions: Boolean): integer;
 procedure SetPosition(const FromPos, ToPos, MappedPos: int64;
   LFMtoLRSPositions: Boolean);
-procedure Add(const LFMPos, LRSPos: Int64; Data: Pointer);
+procedure Add(const LFMPos, LRSPos: Int64; AData: Pointer);
   public
 property LFM[Index: integer]: int64 read GetLFM write SetLFM;
 property LRS[Index: integer]: int64 read GetLRS write SetLRS;
@@ -2606,10 +2606,10 @@
   {$endif}
 end;
 
-constructor TLRSObjectReader.Create(Stream: TStream; BufSize: Integer);
+constructor TLRSObjectReader.Create(AStream: TStream; BufSize: Integer);
 begin
   inherited Create;
-  FStream := Stream;
+  FStream := AStream;
   FBufSize 

Re: [lazarus] Changes for latest fpc-trunk

2005-12-21 Thread Peter Vreman
 Hi all,

 in revision r2020 of fpc the basic-generics support is added. But with
 that patch double identifiers aren't allowed anymore, it seems.

That double identifiers were not reported was an error. It was upto the
order of definition. If the property was defined before the procedure in
the class declaration then it would also fail in the old situation.



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Changes for latest fpc-trunk

2005-12-21 Thread Marc Weustink

Joost van der Sluis wrote:

Yes, use this one instead.


Thanks, committed, r8354

Marc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives