mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 16:49:28 +02:00
fixed compilation with fpc 2.3.1, which does not allow passing literal chars to formal const parameters (bug #10949)
git-svn-id: trunk@14452 -
This commit is contained in:
parent
bd4b61b421
commit
035ee959b3
@ -3819,6 +3819,8 @@ procedure TPascalParserTool.ExtractNextAtom(AddAtom: boolean;
|
||||
var
|
||||
LastAtomEndPos: integer;
|
||||
LastStreamPos: TFPCStreamSeekType;
|
||||
const
|
||||
space: char = ' ';
|
||||
begin
|
||||
LastStreamPos:=ExtractMemStream.Position;
|
||||
if LastAtoms.Count>0 then begin
|
||||
@ -3840,7 +3842,7 @@ begin
|
||||
or ((CurPos.StartPos<=SrcLen) and (IsIdentStartChar[Src[CurPos.StartPos]])
|
||||
and ExtractStreamEndIsIdentChar))
|
||||
then begin
|
||||
ExtractMemStream.Write(' ',1);
|
||||
ExtractMemStream.Write(space,1);
|
||||
LastStreamPos:=ExtractMemStream.Position;
|
||||
end;
|
||||
end;
|
||||
|
@ -345,6 +345,8 @@ var
|
||||
IsProcedure: Boolean;
|
||||
IsFunction: Boolean;
|
||||
IsOperator: Boolean;
|
||||
const
|
||||
SemiColon : char = ';';
|
||||
begin
|
||||
Result:='';
|
||||
ExtractProcHeadPos:=phepNone;
|
||||
@ -451,7 +453,7 @@ begin
|
||||
ExtractNextAtom([phpWithCallingSpecs,phpWithProcModifiers]*Attr<>[],
|
||||
Attr);
|
||||
if not (phpWithProcModifiers in Attr) then
|
||||
ExtractMemStream.Write(';',1);
|
||||
ExtractMemStream.Write(SemiColon,1);
|
||||
end
|
||||
else if (CurPos.Flag=cafEdgedBracketOpen) then begin
|
||||
ReadTilBracketClose(false);
|
||||
|
@ -425,7 +425,8 @@ begin
|
||||
fs:=TFileStream.Create(AFilename,fmOpenReadWrite);
|
||||
try
|
||||
fs.Position:=fs.Size;
|
||||
fs.Write(' ',1);
|
||||
c := ' ';
|
||||
fs.Write(c,1);
|
||||
finally
|
||||
fs.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user