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