* patch by Bi0T1N: fix result type of InterlockedCompareExchange64 for QWord, resolves #37186

git-svn-id: trunk@45647 -
This commit is contained in:
florian 2020-06-13 19:14:20 +00:00
parent febeef03e4
commit bc1b7960ec
2 changed files with 7 additions and 6 deletions

View File

@ -73,15 +73,15 @@
Key:TKey;
end;
var
private
private
type
TContainer = specialize TVector<TPair>;
TTable = specialize TVector<TContainer>;
var
var
FData:TTable;
FDataSize:SizeUInt;
FDataSize:SizeUInt;
procedure EnlargeTable;
public
public
type
TIterator = specialize THashmapIterator<TKey, TValue, TPair, TTable>;
constructor Create;
@ -124,7 +124,7 @@ begin
end;
procedure THashmap.EnlargeTable;
var i,j,h,oldDataSize:SizeUInt;
var i,j,h,oldDataSize:SizeUInt;
curbucket:TContainer;
value:TPair;
begin
@ -195,6 +195,7 @@ begin
{$endif}
inc(i);
end;
// Result:=Default(TValue);
// exception?
end;

View File

@ -1550,7 +1550,7 @@ function InterlockedIncrement64 (var Target: qword) : qword; external name 'FPC_
function InterlockedDecrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDDECREMENT64';
function InterlockedExchange64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGE64';
function InterlockedExchangeAdd64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
function InterlockedCompareExchange64(var Target: qword; NewValue: qword; Comperand: qword): int64; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
function InterlockedCompareExchange64(var Target: qword; NewValue: qword; Comperand: qword): qword; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
{$endif cpu64}