mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +02:00
lcl: fix fpc 2.5.1 compilation for x64
git-svn-id: trunk@23385 -
This commit is contained in:
parent
1af2edb94e
commit
ac0a784f15
@ -90,12 +90,17 @@ type
|
|||||||
procedure EnumerateItems(const Method: TLCLEnumItemsMethod);
|
procedure EnumerateItems(const Method: TLCLEnumItemsMethod);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IF (FPC_VERSION=2) AND (FPC_RELEASE>4)}
|
||||||
|
TStreamSizeType = PtrInt;
|
||||||
|
{$ELSE}
|
||||||
|
TStreamSizeType = Longint;
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
{ TExtMemoryStream }
|
{ TExtMemoryStream }
|
||||||
|
|
||||||
TExtMemoryStream = class(TMemoryStream)
|
TExtMemoryStream = class(TMemoryStream)
|
||||||
protected
|
protected
|
||||||
function Realloc(var NewCapacity: Longint): Pointer; override;
|
function Realloc(var NewCapacity: TStreamSizeType): Pointer; override;
|
||||||
public
|
public
|
||||||
property Capacity;
|
property Capacity;
|
||||||
end;
|
end;
|
||||||
@ -275,12 +280,12 @@ end;
|
|||||||
|
|
||||||
{ TExtMemoryStream }
|
{ TExtMemoryStream }
|
||||||
|
|
||||||
function TExtMemoryStream.Realloc(var NewCapacity: LongInt): Pointer;
|
function TExtMemoryStream.Realloc(var NewCapacity: TStreamSizeType): Pointer;
|
||||||
begin
|
begin
|
||||||
// if we are growing, grow at least a quarter
|
// if we are growing, grow at least a quarter
|
||||||
if (NewCapacity>Capacity) then
|
if (NewCapacity > Capacity) then
|
||||||
NewCapacity := Max(NewCapacity, Capacity + Capacity div 4);
|
NewCapacity := Max(NewCapacity, Capacity + Capacity div 4);
|
||||||
Result:=inherited Realloc(NewCapacity);
|
Result := inherited Realloc(NewCapacity);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user