You've already forked lazarus-ccr
Fix Integer/Cardinal instead of PtrInt/PtrUInt (Thanks Juha)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3859 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2240,7 +2240,7 @@ end;
|
|||||||
function TArrayStackItem.GetScopeItemNames(const AReturnList: TStrings): Integer;
|
function TArrayStackItem.GetScopeItemNames(const AReturnList: TStrings): Integer;
|
||||||
var
|
var
|
||||||
locBuffer : PDataBufferList;
|
locBuffer : PDataBufferList;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
AReturnList.Clear();
|
AReturnList.Clear();
|
||||||
if Assigned(ScopeObject) and ( ScopeObject^.ArrayData^.Count > 0 ) then begin
|
if Assigned(ScopeObject) and ( ScopeObject^.ArrayData^.Count > 0 ) then begin
|
||||||
|
@ -132,7 +132,7 @@ type
|
|||||||
|
|
||||||
TArrayStackItem = class(TStackItem)
|
TArrayStackItem = class(TStackItem)
|
||||||
private
|
private
|
||||||
FIndex : PtrInt;
|
FIndex : Integer;
|
||||||
protected
|
protected
|
||||||
function GetDataObject() : TJSONArray;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function GetDataObject() : TJSONArray;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
public
|
public
|
||||||
@ -1668,7 +1668,7 @@ function TObjectStackItem.CreateStringBuffer(
|
|||||||
) : TJSONData;
|
) : TJSONData;
|
||||||
var
|
var
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
locObj := GetDataObject();
|
locObj := GetDataObject();
|
||||||
Result := FindObject(locObj,AName);
|
Result := FindObject(locObj,AName);
|
||||||
@ -1686,7 +1686,7 @@ function TObjectStackItem.CreateIntBuffer(
|
|||||||
) : TJSONData;
|
) : TJSONData;
|
||||||
var
|
var
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
locObj := GetDataObject();
|
locObj := GetDataObject();
|
||||||
Result := FindObject(locObj,AName);
|
Result := FindObject(locObj,AName);
|
||||||
@ -1705,7 +1705,7 @@ function TObjectStackItem.CreateInt64Buffer(
|
|||||||
{$IFDEF WST_HAS_JSON_INT64}
|
{$IFDEF WST_HAS_JSON_INT64}
|
||||||
var
|
var
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
locObj := GetDataObject();
|
locObj := GetDataObject();
|
||||||
Result := FindObject(locObj,AName);
|
Result := FindObject(locObj,AName);
|
||||||
@ -1728,7 +1728,7 @@ function TObjectStackItem.CreateFloatBuffer(
|
|||||||
) : TJSONData;
|
) : TJSONData;
|
||||||
var
|
var
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
locObj := GetDataObject();
|
locObj := GetDataObject();
|
||||||
Result := FindObject(locObj,AName);
|
Result := FindObject(locObj,AName);
|
||||||
@ -1746,7 +1746,7 @@ function TObjectStackItem.CreateBoolBuffer(
|
|||||||
) : TJSONData;
|
) : TJSONData;
|
||||||
var
|
var
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
locObj := GetDataObject();
|
locObj := GetDataObject();
|
||||||
Result := FindObject(locObj,AName);
|
Result := FindObject(locObj,AName);
|
||||||
@ -1787,7 +1787,7 @@ end;
|
|||||||
|
|
||||||
function TObjectStackItem.NilItem(AItem : TJSONData) : TJSONData;
|
function TObjectStackItem.NilItem(AItem : TJSONData) : TJSONData;
|
||||||
var
|
var
|
||||||
locPos : PtrInt;
|
locPos : Integer;
|
||||||
begin
|
begin
|
||||||
locPos := GetDataObject().IndexOf(AItem);
|
locPos := GetDataObject().IndexOf(AItem);
|
||||||
if ( locPos < 0 ) then
|
if ( locPos < 0 ) then
|
||||||
@ -1803,7 +1803,7 @@ end;
|
|||||||
|
|
||||||
function TObjectStackItem.GetScopeItemNames(const AReturnList : TStrings) : Integer;
|
function TObjectStackItem.GetScopeItemNames(const AReturnList : TStrings) : Integer;
|
||||||
var
|
var
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locObj : TJSONObject;
|
locObj : TJSONObject;
|
||||||
begin
|
begin
|
||||||
AReturnList.Clear();
|
AReturnList.Clear();
|
||||||
@ -1891,7 +1891,7 @@ end;
|
|||||||
|
|
||||||
function TArrayStackItem.NilItem(AItem : TJSONData) : TJSONData;
|
function TArrayStackItem.NilItem(AItem : TJSONData) : TJSONData;
|
||||||
var
|
var
|
||||||
locPos : PtrInt;
|
locPos : Integer;
|
||||||
begin
|
begin
|
||||||
locPos := GetDataObject().IndexOf(AItem);
|
locPos := GetDataObject().IndexOf(AItem);
|
||||||
if ( locPos < 0 ) then
|
if ( locPos < 0 ) then
|
||||||
@ -1907,7 +1907,7 @@ end;
|
|||||||
|
|
||||||
function TArrayStackItem.GetScopeItemNames(const AReturnList : TStrings) : Integer;
|
function TArrayStackItem.GetScopeItemNames(const AReturnList : TStrings) : Integer;
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
AReturnList.Clear();
|
AReturnList.Clear();
|
||||||
for i := 1 to GetDataObject().Count do
|
for i := 1 to GetDataObject().Count do
|
||||||
|
@ -1499,23 +1499,23 @@ type
|
|||||||
FCS : TCriticalSection;
|
FCS : TCriticalSection;
|
||||||
FLock : TSemaphoreObject;
|
FLock : TSemaphoreObject;
|
||||||
FFactory : IItemFactory;
|
FFactory : IItemFactory;
|
||||||
FMin : PtrInt;
|
FMin : Integer;
|
||||||
FMax : PtrInt;
|
FMax : Integer;
|
||||||
private
|
private
|
||||||
function CreateNew(const AUsed : Boolean) : TIntfPoolItem;
|
function CreateNew(const AUsed : Boolean) : TIntfPoolItem;
|
||||||
function TryGet(const AIndex : PtrInt) : Boolean;
|
function TryGet(const AIndex: Integer): Boolean;
|
||||||
public
|
public
|
||||||
constructor Create(
|
constructor Create(
|
||||||
const AMin, AMax : PtrInt;
|
const AMin, AMax : Integer;
|
||||||
AFactory : IItemFactory
|
AFactory : IItemFactory
|
||||||
);
|
);
|
||||||
destructor Destroy();override;
|
destructor Destroy();override;
|
||||||
function Get(const ATimeOut : Cardinal) : IInterface;
|
function Get(const ATimeOut : Cardinal) : IInterface;
|
||||||
procedure Release(const AItem : IInterface);
|
procedure Release(const AItem : IInterface);
|
||||||
procedure Discard(const AItem : IInterface);
|
procedure Discard(const AItem : IInterface);
|
||||||
function GetInstancesCount() : PtrInt;
|
function GetInstancesCount: Integer;
|
||||||
property Min : PtrInt read FMin;
|
property Min : Integer read FMin;
|
||||||
property Max : PtrInt read FMax;
|
property Max : Integer read FMax;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TSimpleItemFactoryEx }
|
{ TSimpleItemFactoryEx }
|
||||||
@ -1523,8 +1523,8 @@ type
|
|||||||
TSimpleItemFactoryEx = class(TSimpleItemFactory,IInterface,IItemFactory,IItemFactoryEx)
|
TSimpleItemFactoryEx = class(TSimpleItemFactory,IInterface,IItemFactory,IItemFactoryEx)
|
||||||
private
|
private
|
||||||
FPooled: Boolean;
|
FPooled: Boolean;
|
||||||
FPoolMax: PtrInt;
|
FPoolMax: Integer;
|
||||||
FPoolMin: PtrInt;
|
FPoolMin: Integer;
|
||||||
FPropertyNames : TStringList;
|
FPropertyNames : TStringList;
|
||||||
FProperties : IInterfaceList;
|
FProperties : IInterfaceList;
|
||||||
FPool : TIntfPool;
|
FPool : TIntfPool;
|
||||||
@ -1532,8 +1532,8 @@ type
|
|||||||
private
|
private
|
||||||
procedure PreparePool();{$IFDEF USE_INLINE}inline;{$ENDIF}
|
procedure PreparePool();{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
procedure SetPooled(const AValue: Boolean);
|
procedure SetPooled(const AValue: Boolean);
|
||||||
procedure SetPoolMax(const AValue: PtrInt);
|
procedure SetPoolMax(const AValue: Integer);
|
||||||
procedure SetPoolMin(const AValue: PtrInt);
|
procedure SetPoolMin(const AValue: Integer);
|
||||||
protected
|
protected
|
||||||
function CreateInstance():IInterface;override;
|
function CreateInstance():IInterface;override;
|
||||||
procedure ReleaseInstance(const AInstance : IInterface);virtual;
|
procedure ReleaseInstance(const AInstance : IInterface);virtual;
|
||||||
@ -1550,8 +1550,8 @@ type
|
|||||||
constructor Create(AItemClass : TSimpleFactoryItemClass);overload;
|
constructor Create(AItemClass : TSimpleFactoryItemClass);overload;
|
||||||
destructor Destroy();override;
|
destructor Destroy();override;
|
||||||
published
|
published
|
||||||
property PoolMax : PtrInt read FPoolMax write SetPoolMax;
|
property PoolMax : Integer read FPoolMax write SetPoolMax;
|
||||||
property PoolMin : PtrInt read FPoolMin write SetPoolMin;
|
property PoolMin : Integer read FPoolMin write SetPoolMin;
|
||||||
property Pooled : Boolean read FPooled write SetPooled;
|
property Pooled : Boolean read FPooled write SetPooled;
|
||||||
property TimeOut : PtrUInt read FTimeOut write FTimeOut;
|
property TimeOut : PtrUInt read FTimeOut write FTimeOut;
|
||||||
end;
|
end;
|
||||||
@ -2711,7 +2711,7 @@ end;
|
|||||||
procedure TBaseObjectArrayRemotable.Assign(Source: TPersistent);
|
procedure TBaseObjectArrayRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TBaseObjectArrayRemotable;
|
src : TBaseObjectArrayRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) then begin
|
if Assigned(Source) then begin
|
||||||
if Source.InheritsFrom(TBaseObjectArrayRemotable) then begin
|
if Source.InheritsFrom(TBaseObjectArrayRemotable) then begin
|
||||||
@ -2731,7 +2731,7 @@ end;
|
|||||||
|
|
||||||
function TBaseObjectArrayRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
function TBaseObjectArrayRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
||||||
var
|
var
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
dst : TBaseObjectArrayRemotable;
|
dst : TBaseObjectArrayRemotable;
|
||||||
begin
|
begin
|
||||||
if ( Self = ACompareTo ) then begin
|
if ( Self = ACompareTo ) then begin
|
||||||
@ -2901,7 +2901,7 @@ begin
|
|||||||
FPooled := AValue;
|
FPooled := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimpleItemFactoryEx.SetPoolMax(const AValue: PtrInt);
|
procedure TSimpleItemFactoryEx.SetPoolMax(const AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if ( FPoolMax = AValue ) then
|
if ( FPoolMax = AValue ) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -2910,7 +2910,7 @@ begin
|
|||||||
FPoolMax := AValue;
|
FPoolMax := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimpleItemFactoryEx.SetPoolMin(const AValue: PtrInt);
|
procedure TSimpleItemFactoryEx.SetPoolMin(const AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if ( FPoolMin = AValue ) then
|
if ( FPoolMin = AValue ) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -3260,7 +3260,7 @@ end;
|
|||||||
|
|
||||||
procedure TTypeRegistryItem.RegisterObject(const APropName : string; const AObject : TObject);
|
procedure TTypeRegistryItem.RegisterObject(const APropName : string; const AObject : TObject);
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
i := IndexOfProp(APropName,pntInternalName);
|
i := IndexOfProp(APropName,pntInternalName);
|
||||||
if ( i = -1 ) then begin
|
if ( i = -1 ) then begin
|
||||||
@ -3322,7 +3322,7 @@ end;
|
|||||||
|
|
||||||
function TTypeRegistry.GetItemClassFor(const ATypeInfo : PTypeInfo) : TTypeRegistryItemClass;
|
function TTypeRegistry.GetItemClassFor(const ATypeInfo : PTypeInfo) : TTypeRegistryItemClass;
|
||||||
var
|
var
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locInitializer : TRemotableTypeInitializerClass;
|
locInitializer : TRemotableTypeInitializerClass;
|
||||||
begin
|
begin
|
||||||
Result := TTypeRegistryItem;
|
Result := TTypeRegistryItem;
|
||||||
@ -3341,7 +3341,7 @@ end;
|
|||||||
{$IFDEF TRemotableTypeInitializer_Initialize}
|
{$IFDEF TRemotableTypeInitializer_Initialize}
|
||||||
procedure TTypeRegistry.InitializeItem(AItem : TTypeRegistryItem);
|
procedure TTypeRegistry.InitializeItem(AItem : TTypeRegistryItem);
|
||||||
var
|
var
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locInitializer : TRemotableTypeInitializerClass;
|
locInitializer : TRemotableTypeInitializerClass;
|
||||||
begin
|
begin
|
||||||
c := FInitializerList.Count;
|
c := FInitializerList.Count;
|
||||||
@ -3652,7 +3652,7 @@ end;
|
|||||||
procedure TArrayOfStringRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfStringRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfStringRemotable;
|
src : TArrayOfStringRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfStringRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfStringRemotable) then begin
|
||||||
src := TArrayOfStringRemotable(Source);
|
src := TArrayOfStringRemotable(Source);
|
||||||
@ -3670,7 +3670,7 @@ end;
|
|||||||
|
|
||||||
function TArrayOfStringRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
function TArrayOfStringRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
||||||
var
|
var
|
||||||
i, c : Ptrint;
|
i, c : Integer;
|
||||||
dst : TArrayOfStringRemotable;
|
dst : TArrayOfStringRemotable;
|
||||||
begin
|
begin
|
||||||
if ( Self = ACompareTo ) then begin
|
if ( Self = ACompareTo ) then begin
|
||||||
@ -3816,7 +3816,7 @@ procedure TObjectCollectionRemotable.Assign(Source : TPersistent);
|
|||||||
var
|
var
|
||||||
srcCol : TObjectCollectionRemotable;
|
srcCol : TObjectCollectionRemotable;
|
||||||
src : TBaseObjectArrayRemotable;
|
src : TBaseObjectArrayRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) then begin
|
if Assigned(Source) then begin
|
||||||
if Source.InheritsFrom(TObjectCollectionRemotable) then begin
|
if Source.InheritsFrom(TObjectCollectionRemotable) then begin
|
||||||
@ -3845,7 +3845,7 @@ end;
|
|||||||
|
|
||||||
function TObjectCollectionRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
function TObjectCollectionRemotable.Equal(const ACompareTo : TBaseRemotable) : Boolean;
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
nativeCol : TObjectCollectionRemotable;
|
nativeCol : TObjectCollectionRemotable;
|
||||||
nativeArray : TBaseObjectArrayRemotable;
|
nativeArray : TBaseObjectArrayRemotable;
|
||||||
res : Boolean;
|
res : Boolean;
|
||||||
@ -4036,7 +4036,7 @@ end;
|
|||||||
procedure TArrayOfBooleanRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfBooleanRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfBooleanRemotable;
|
src : TArrayOfBooleanRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfBooleanRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfBooleanRemotable) then begin
|
||||||
src := TArrayOfBooleanRemotable(Source);
|
src := TArrayOfBooleanRemotable(Source);
|
||||||
@ -4100,7 +4100,7 @@ end;
|
|||||||
procedure TArrayOfInt8URemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt8URemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt8URemotable;
|
src : TArrayOfInt8URemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt8URemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt8URemotable) then begin
|
||||||
src := TArrayOfInt8URemotable(Source);
|
src := TArrayOfInt8URemotable(Source);
|
||||||
@ -4164,7 +4164,7 @@ end;
|
|||||||
procedure TArrayOfInt8SRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt8SRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt8SRemotable;
|
src : TArrayOfInt8SRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt8SRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt8SRemotable) then begin
|
||||||
src := TArrayOfInt8SRemotable(Source);
|
src := TArrayOfInt8SRemotable(Source);
|
||||||
@ -4228,7 +4228,7 @@ end;
|
|||||||
procedure TArrayOfInt16SRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt16SRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt16SRemotable;
|
src : TArrayOfInt16SRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt16SRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt16SRemotable) then begin
|
||||||
src := TArrayOfInt16SRemotable(Source);
|
src := TArrayOfInt16SRemotable(Source);
|
||||||
@ -4292,7 +4292,7 @@ end;
|
|||||||
procedure TArrayOfInt16URemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt16URemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt16URemotable;
|
src : TArrayOfInt16URemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt16URemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt16URemotable) then begin
|
||||||
src := TArrayOfInt16URemotable(Source);
|
src := TArrayOfInt16URemotable(Source);
|
||||||
@ -4356,7 +4356,7 @@ end;
|
|||||||
procedure TArrayOfInt32URemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt32URemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt32URemotable;
|
src : TArrayOfInt32URemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt32URemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt32URemotable) then begin
|
||||||
src := TArrayOfInt32URemotable(Source);
|
src := TArrayOfInt32URemotable(Source);
|
||||||
@ -4420,7 +4420,7 @@ end;
|
|||||||
procedure TArrayOfInt32SRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt32SRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt32SRemotable;
|
src : TArrayOfInt32SRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt32SRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt32SRemotable) then begin
|
||||||
src := TArrayOfInt32SRemotable(Source);
|
src := TArrayOfInt32SRemotable(Source);
|
||||||
@ -4484,7 +4484,7 @@ end;
|
|||||||
procedure TArrayOfInt64SRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt64SRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt64SRemotable;
|
src : TArrayOfInt64SRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt64SRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt64SRemotable) then begin
|
||||||
src := TArrayOfInt64SRemotable(Source);
|
src := TArrayOfInt64SRemotable(Source);
|
||||||
@ -4548,7 +4548,7 @@ end;
|
|||||||
procedure TArrayOfInt64URemotable.Assign(Source: TPersistent);
|
procedure TArrayOfInt64URemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfInt64URemotable;
|
src : TArrayOfInt64URemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt64URemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfInt64URemotable) then begin
|
||||||
src := TArrayOfInt64URemotable(Source);
|
src := TArrayOfInt64URemotable(Source);
|
||||||
@ -4612,7 +4612,7 @@ end;
|
|||||||
procedure TArrayOfFloatSingleRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfFloatSingleRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfFloatSingleRemotable;
|
src : TArrayOfFloatSingleRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatSingleRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatSingleRemotable) then begin
|
||||||
src := TArrayOfFloatSingleRemotable(Source);
|
src := TArrayOfFloatSingleRemotable(Source);
|
||||||
@ -4676,7 +4676,7 @@ end;
|
|||||||
procedure TArrayOfFloatDoubleRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfFloatDoubleRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfFloatDoubleRemotable;
|
src : TArrayOfFloatDoubleRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatDoubleRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatDoubleRemotable) then begin
|
||||||
src := TArrayOfFloatDoubleRemotable(Source);
|
src := TArrayOfFloatDoubleRemotable(Source);
|
||||||
@ -4740,7 +4740,7 @@ end;
|
|||||||
procedure TArrayOfFloatExtendedRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfFloatExtendedRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfFloatExtendedRemotable;
|
src : TArrayOfFloatExtendedRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatExtendedRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatExtendedRemotable) then begin
|
||||||
src := TArrayOfFloatExtendedRemotable(Source);
|
src := TArrayOfFloatExtendedRemotable(Source);
|
||||||
@ -4804,7 +4804,7 @@ end;
|
|||||||
procedure TArrayOfFloatCurrencyRemotable.Assign(Source: TPersistent);
|
procedure TArrayOfFloatCurrencyRemotable.Assign(Source: TPersistent);
|
||||||
var
|
var
|
||||||
src : TArrayOfFloatCurrencyRemotable;
|
src : TArrayOfFloatCurrencyRemotable;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatCurrencyRemotable) then begin
|
if Assigned(Source) and Source.InheritsFrom(TArrayOfFloatCurrencyRemotable) then begin
|
||||||
src := TArrayOfFloatCurrencyRemotable(Source);
|
src := TArrayOfFloatCurrencyRemotable(Source);
|
||||||
@ -6196,7 +6196,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIntfPool.TryGet(const AIndex: PtrInt): Boolean;
|
function TIntfPool.TryGet(const AIndex: Integer): Boolean;
|
||||||
var
|
var
|
||||||
itm : TIntfPoolItem;
|
itm : TIntfPoolItem;
|
||||||
begin
|
begin
|
||||||
@ -6212,12 +6212,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TIntfPool.Create(
|
constructor TIntfPool.Create(const AMin, AMax: Integer; AFactory: IItemFactory);
|
||||||
const AMin, AMax : PtrInt;
|
|
||||||
AFactory : IItemFactory
|
|
||||||
);
|
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
if not ( ( AMin >= 0 ) and ( AMax >= AMin ) and ( AFactory <> nil ) ) then
|
if not ( ( AMin >= 0 ) and ( AMax >= AMin ) and ( AFactory <> nil ) ) then
|
||||||
raise Exception.CreateFmt(SERR_InvalidPoolParametersArgs,[AMin,AMax]);
|
raise Exception.CreateFmt(SERR_InvalidPoolParametersArgs,[AMin,AMax]);
|
||||||
@ -6243,7 +6240,7 @@ end;
|
|||||||
|
|
||||||
function TIntfPool.Get(const ATimeOut : Cardinal): IInterface;
|
function TIntfPool.Get(const ATimeOut : Cardinal): IInterface;
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
if ( FLock.WaitFor(ATimeOut) = wrSignaled ) then begin
|
if ( FLock.WaitFor(ATimeOut) = wrSignaled ) then begin
|
||||||
@ -6263,7 +6260,7 @@ end;
|
|||||||
|
|
||||||
procedure TIntfPool.Release(const AItem: IInterface);
|
procedure TIntfPool.Release(const AItem: IInterface);
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
a : IInterface;
|
a : IInterface;
|
||||||
begin
|
begin
|
||||||
a := AItem as IInterface;
|
a := AItem as IInterface;
|
||||||
@ -6278,7 +6275,7 @@ end;
|
|||||||
|
|
||||||
procedure TIntfPool.Discard(const AItem : IInterface);
|
procedure TIntfPool.Discard(const AItem : IInterface);
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
a : IInterface;
|
a : IInterface;
|
||||||
itm : TIntfPoolItem;
|
itm : TIntfPoolItem;
|
||||||
begin
|
begin
|
||||||
@ -6294,7 +6291,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIntfPool.GetInstancesCount() : PtrInt;
|
function TIntfPool.GetInstancesCount() : Integer;
|
||||||
begin
|
begin
|
||||||
FCS.Acquire();
|
FCS.Acquire();
|
||||||
try
|
try
|
||||||
@ -6371,7 +6368,7 @@ class procedure TRemotableRecordEncoder.Save(
|
|||||||
var
|
var
|
||||||
recStart, recFieldAddress : PByte;
|
recStart, recFieldAddress : PByte;
|
||||||
typData : PRecordTypeData;
|
typData : PRecordTypeData;
|
||||||
i : PtrInt;
|
i : PtrUInt;
|
||||||
pt : PTypeInfo;
|
pt : PTypeInfo;
|
||||||
p : PRecordFieldInfo;
|
p : PRecordFieldInfo;
|
||||||
oldSS,ss : TSerializationStyle;
|
oldSS,ss : TSerializationStyle;
|
||||||
@ -6475,7 +6472,7 @@ class procedure TRemotableRecordEncoder.Load(
|
|||||||
var
|
var
|
||||||
recStart, recFieldAddress : PByte;
|
recStart, recFieldAddress : PByte;
|
||||||
typData : PRecordTypeData;
|
typData : PRecordTypeData;
|
||||||
i : PtrInt;
|
i : PtrUInt;
|
||||||
pt : PTypeInfo;
|
pt : PTypeInfo;
|
||||||
propName : String;
|
propName : String;
|
||||||
p : PRecordFieldInfo;
|
p : PRecordFieldInfo;
|
||||||
|
@ -134,7 +134,7 @@ end;
|
|||||||
{$ELSE} // assume ENDIAN_LITTLE
|
{$ELSE} // assume ENDIAN_LITTLE
|
||||||
procedure ReverseBytes(var AData; const ALength : Integer);
|
procedure ReverseBytes(var AData; const ALength : Integer);
|
||||||
Var
|
Var
|
||||||
i,j : PtrInt;
|
i,j : Integer;
|
||||||
c : Byte;
|
c : Byte;
|
||||||
pDt : {$IFDEF FPC}^Byte{$ELSE}PByteArray{$ENDIF};
|
pDt : {$IFDEF FPC}^Byte{$ELSE}PByteArray{$ENDIF};
|
||||||
begin
|
begin
|
||||||
@ -191,14 +191,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF ENDIAN_BIG}
|
{$IFDEF ENDIAN_BIG}
|
||||||
procedure Reverse_Array(var AValue; const AArrayLength, AItemSize : PtrInt);{$IFDEF USE_INLINE}inline;{$ENDIF}
|
procedure Reverse_Array(var AValue; const AArrayLength, AItemSize : Integer);{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
{$ELSE ENDIAN_BIG}
|
{$ELSE ENDIAN_BIG}
|
||||||
procedure Reverse_Array(var AValue; const AArrayLength, AItemSize : PtrInt);
|
procedure Reverse_Array(var AValue; const AArrayLength, AItemSize : Integer);
|
||||||
var
|
var
|
||||||
p : PByte;
|
p : PByte;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
if ( AArrayLength > 0 ) and ( AItemSize > 1 ) then begin
|
if ( AArrayLength > 0 ) and ( AItemSize > 1 ) then begin
|
||||||
p := @AValue;
|
p := @AValue;
|
||||||
|
@ -654,7 +654,7 @@ function xsd_TryStrToDuration(
|
|||||||
var
|
var
|
||||||
pc : PChar;
|
pc : PChar;
|
||||||
locIntBuffer : array[dpYear..dpFractionalSecond] of PtrUInt;
|
locIntBuffer : array[dpYear..dpFractionalSecond] of PtrUInt;
|
||||||
i, bufferLength, lastPos : PtrInt;
|
i, bufferLength, lastPos : Integer;
|
||||||
localBuffer : string;
|
localBuffer : string;
|
||||||
part, oldPart : TDatePart;
|
part, oldPart : TDatePart;
|
||||||
inTimePart : Boolean;
|
inTimePart : Boolean;
|
||||||
|
@ -33,8 +33,8 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure Reset();
|
procedure Reset();
|
||||||
function MoveNext() : Boolean;virtual;
|
function MoveNext() : Boolean;virtual;
|
||||||
function Clone():ICursor;
|
function Clone(): ICursor;
|
||||||
function GetCount() : PtrInt;
|
function GetCount() : Integer;
|
||||||
function GetCurrent() : TObject;
|
function GetCurrent() : TObject;
|
||||||
public
|
public
|
||||||
constructor Create(ADataList : TObjectList);
|
constructor Create(ADataList : TObjectList);
|
||||||
@ -73,7 +73,7 @@ begin
|
|||||||
Result := TObjectListCursor.Create(FList) as ICursor;
|
Result := TObjectListCursor.Create(FList) as ICursor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TObjectListCursor.GetCount() : PtrInt;
|
function TObjectListCursor.GetCount() : Integer;
|
||||||
begin
|
begin
|
||||||
Result := FList.Count;
|
Result := FList.Count;
|
||||||
end;
|
end;
|
||||||
|
@ -157,7 +157,7 @@ end;
|
|||||||
procedure FillDataFromFile(const AFileName : string);
|
procedure FillDataFromFile(const AFileName : string);
|
||||||
var
|
var
|
||||||
objArray : TUserArray;
|
objArray : TUserArray;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
obj : TUser;
|
obj : TUser;
|
||||||
begin
|
begin
|
||||||
objArray := TUserArray.Create();
|
objArray := TUserArray.Create();
|
||||||
|
@ -130,7 +130,7 @@ var
|
|||||||
{$ENDIF HAS_FORMAT_SETTINGS}
|
{$ENDIF HAS_FORMAT_SETTINGS}
|
||||||
function TranslateDotToDecimalSeperator(const Value: string) : string;
|
function TranslateDotToDecimalSeperator(const Value: string) : string;
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
Result := Value;
|
Result := Value;
|
||||||
for i := 1 to length(Result) do begin
|
for i := 1 to length(Result) do begin
|
||||||
@ -289,7 +289,7 @@ end;
|
|||||||
procedure TPublishedPropertyManager.SetProperties(const APropsStr: string);
|
procedure TPublishedPropertyManager.SetProperties(const APropsStr: string);
|
||||||
var
|
var
|
||||||
lst : TStringList;
|
lst : TStringList;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
If IsStrEmpty(APropsStr) Then
|
If IsStrEmpty(APropsStr) Then
|
||||||
Exit;
|
Exit;
|
||||||
|
@ -110,7 +110,7 @@ end;
|
|||||||
|
|
||||||
procedure TJsonRpcFormatter.SetVersion(const AValue : string);
|
procedure TJsonRpcFormatter.SetVersion(const AValue : string);
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
if ( FVersion = AValue ) then
|
if ( FVersion = AValue ) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -175,7 +175,7 @@ Var
|
|||||||
e : EJsonRpcException;
|
e : EJsonRpcException;
|
||||||
elt : TJSONData;
|
elt : TJSONData;
|
||||||
remoteErr : TJSONObject;
|
remoteErr : TJSONObject;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
ClearStack();
|
ClearStack();
|
||||||
PushStack(GetRootData(),stObject);
|
PushStack(GetRootData(),stObject);
|
||||||
|
@ -1016,7 +1016,7 @@ var
|
|||||||
typItm, propTypItm : TTypeRegistryItem;
|
typItm, propTypItm : TTypeRegistryItem;
|
||||||
s, prop_ns_shortName : string;
|
s, prop_ns_shortName : string;
|
||||||
defTypesNode, defSchemaNode, cplxNode, sqcNode, propNode : TDOMElement;
|
defTypesNode, defSchemaNode, cplxNode, sqcNode, propNode : TDOMElement;
|
||||||
i : Integer;
|
i : PtrUInt;
|
||||||
p : TRecordFieldInfo;
|
p : TRecordFieldInfo;
|
||||||
objTypeData : PRecordTypeData;
|
objTypeData : PRecordTypeData;
|
||||||
persistType : TPropStoreType;
|
persistType : TPropStoreType;
|
||||||
|
@ -1313,7 +1313,7 @@ procedure TObjectSerializer.Prepare(ATypeRegistry : TTypeRegistry);
|
|||||||
var
|
var
|
||||||
locObjTypeData : PTypeData;
|
locObjTypeData : PTypeData;
|
||||||
locTypeInfo : PTypeInfo;
|
locTypeInfo : PTypeInfo;
|
||||||
c, i : PtrInt;
|
c, i : Integer;
|
||||||
ppi : PPropInfo;
|
ppi : PPropInfo;
|
||||||
cl : TClass;
|
cl : TClass;
|
||||||
serArray : array of TPropSerializationInfo;
|
serArray : array of TPropSerializationInfo;
|
||||||
@ -1477,7 +1477,7 @@ procedure TObjectSerializer.Read(
|
|||||||
);
|
);
|
||||||
var
|
var
|
||||||
oldSS : TSerializationStyle;
|
oldSS : TSerializationStyle;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locSerInfo : TPropSerializationInfo;
|
locSerInfo : TPropSerializationInfo;
|
||||||
begin
|
begin
|
||||||
oldSS := AStore.GetSerializationStyle();
|
oldSS := AStore.GetSerializationStyle();
|
||||||
@ -1516,7 +1516,7 @@ procedure TObjectSerializer.Save(
|
|||||||
);
|
);
|
||||||
var
|
var
|
||||||
oldSS : TSerializationStyle;
|
oldSS : TSerializationStyle;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locSerInfo : TPropSerializationInfo;
|
locSerInfo : TPropSerializationInfo;
|
||||||
begin
|
begin
|
||||||
oldSS := AStore.GetSerializationStyle();
|
oldSS := AStore.GetSerializationStyle();
|
||||||
@ -1616,7 +1616,7 @@ var
|
|||||||
var
|
var
|
||||||
locObjTypeData : PTypeData;
|
locObjTypeData : PTypeData;
|
||||||
locTypeInfo : PTypeInfo;
|
locTypeInfo : PTypeInfo;
|
||||||
c, i : PtrInt;
|
c, i : Integer;
|
||||||
clPL : PPropList;
|
clPL : PPropList;
|
||||||
begin
|
begin
|
||||||
FSerializationInfos.Clear();
|
FSerializationInfos.Clear();
|
||||||
@ -1730,7 +1730,7 @@ procedure TSimpleContentObjectSerializer.Read(
|
|||||||
);
|
);
|
||||||
var
|
var
|
||||||
oldSS : TSerializationStyle;
|
oldSS : TSerializationStyle;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locSerInfo : TPropSerializationInfo;
|
locSerInfo : TPropSerializationInfo;
|
||||||
begin
|
begin
|
||||||
oldSS := AStore.GetSerializationStyle();
|
oldSS := AStore.GetSerializationStyle();
|
||||||
@ -1769,7 +1769,7 @@ procedure TSimpleContentObjectSerializer.Save(
|
|||||||
);
|
);
|
||||||
var
|
var
|
||||||
oldSS : TSerializationStyle;
|
oldSS : TSerializationStyle;
|
||||||
i, c : PtrInt;
|
i, c : Integer;
|
||||||
locSerInfo : TPropSerializationInfo;
|
locSerInfo : TPropSerializationInfo;
|
||||||
begin
|
begin
|
||||||
oldSS := AStore.GetSerializationStyle();
|
oldSS := AStore.GetSerializationStyle();
|
||||||
|
@ -157,7 +157,7 @@ end;
|
|||||||
procedure FillDataFromFile(const AFileName : string);
|
procedure FillDataFromFile(const AFileName : string);
|
||||||
var
|
var
|
||||||
objArray : TUserArray;
|
objArray : TUserArray;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
obj : TUser;
|
obj : TUser;
|
||||||
begin
|
begin
|
||||||
objArray := TUserArray.Create();
|
objArray := TUserArray.Create();
|
||||||
|
@ -67,7 +67,7 @@ implementation
|
|||||||
constructor TSemaphoreObject.Create(const ALimit: Integer);
|
constructor TSemaphoreObject.Create(const ALimit: Integer);
|
||||||
{$IFDEF FPC_TM}
|
{$IFDEF FPC_TM}
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
if ( ALimit < 1 ) then
|
if ( ALimit < 1 ) then
|
||||||
|
@ -110,7 +110,7 @@ end;
|
|||||||
|
|
||||||
procedure TJsonRpcFormatter.SetVersion(const AValue : string);
|
procedure TJsonRpcFormatter.SetVersion(const AValue : string);
|
||||||
var
|
var
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
if ( FVersion = AValue ) then
|
if ( FVersion = AValue ) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -157,7 +157,7 @@ var
|
|||||||
nameBuffer, strBuffer : string;
|
nameBuffer, strBuffer : string;
|
||||||
rootObj : TJSONObject;
|
rootObj : TJSONObject;
|
||||||
tmpObj : TJSONData;
|
tmpObj : TJSONData;
|
||||||
i : PtrInt;
|
i : Integer;
|
||||||
paramsAsArray : Boolean;
|
paramsAsArray : Boolean;
|
||||||
begin
|
begin
|
||||||
ClearStack();
|
ClearStack();
|
||||||
|
@ -102,7 +102,7 @@ function TClientHandlerThread.ReadInputBuffer(): Integer;
|
|||||||
var
|
var
|
||||||
binBuff : TByteDynArray;
|
binBuff : TByteDynArray;
|
||||||
bufferLen : LongInt;
|
bufferLen : LongInt;
|
||||||
i, j, c, readBufferLen : PtrInt;
|
i, j, c, readBufferLen : Integer;
|
||||||
begin
|
begin
|
||||||
FInputStream.Size := 0;
|
FInputStream.Size := 0;
|
||||||
Result := 0;
|
Result := 0;
|
||||||
|
Reference in New Issue
Block a user