mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 08:30:54 +02:00
* Fix interlockedincrement
This commit is contained in:
parent
2619e6b870
commit
d07e34297f
@ -362,7 +362,11 @@ Type
|
||||
TCustomJSONRPCHandlerManager = Class(TComponent)
|
||||
Private
|
||||
FRegistering: Boolean;
|
||||
{$IFDEF CPU64}
|
||||
FHandlerCount : Int64;
|
||||
{$ELSE}
|
||||
FHandlerCount : Integer;
|
||||
{$ENDIF}
|
||||
Protected
|
||||
procedure Initialize; virtual;
|
||||
procedure DoClear; virtual;
|
||||
@ -1827,7 +1831,11 @@ begin
|
||||
N:=aContainer.Name;
|
||||
if N='' then
|
||||
N:=aContainer.ClassName;
|
||||
{$IFDEF CPU64}
|
||||
N:=N+IntToStr(InterlockedIncrement64(FHandlerCount));
|
||||
{$ELSE}
|
||||
N:=N+IntToStr(InterlockedIncrement(FHandlerCount));
|
||||
{$ENDIF}
|
||||
aContainer.Name:=N;
|
||||
O.InsertComponent(aContainer);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user