From 0c68a8dddbe4ec4523f9353e6c0b631b8119a29b Mon Sep 17 00:00:00 2001 From: Honza Rames Date: Tue, 14 Feb 2017 13:12:24 +0100 Subject: [PATCH] updated cycle scanner to use Integer rather than LongInt which should have the same width on all platforms (according to docs) --- Source/LeakCheck.Cycle.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/LeakCheck.Cycle.pas b/Source/LeakCheck.Cycle.pas index 5558085..100ef8c 100644 --- a/Source/LeakCheck.Cycle.pas +++ b/Source/LeakCheck.Cycle.pas @@ -163,7 +163,7 @@ TScanner = class class procedure PeekData(var P: PByte; var Data; Len: Integer); inline; class procedure ReadData(var P: PByte; var Data; Len: Integer); inline; class function ReadI16(var P: PByte): Smallint; inline; - class function ReadI32(var P: PByte): Longint; inline; + class function ReadI32(var P: PByte): Integer; inline; class function ReadI8(var P: PByte): Shortint; inline; class function ReadPointer(var P: PByte): Pointer; inline; class function ReadU16(var P: PByte): Word; inline; @@ -324,7 +324,7 @@ class function TScanner.ReadI16(var P: PByte): Smallint; ReadData(P, Result, SizeOf(Result)); end; -class function TScanner.ReadI32(var P: PByte): Longint; +class function TScanner.ReadI32(var P: PByte): Integer; begin ReadData(P, Result, SizeOf(Result)); end; @@ -475,7 +475,7 @@ procedure TScanner.ScanClassInternal(const Instance: TObject); ClassTab: PVmtFieldClassTab; I: Integer; Total, Found: Integer; - Count: LongInt; + Count: Integer; LastFieldOffset: Integer; Classic: TArray; Comparer: IComparer; @@ -654,7 +654,7 @@ procedure TScanner.ScanRecord(P: Pointer; TypeInfo: PTypeInfo; function ScanExtended(Inst: Pointer; TypeInfo: PTypeInfo): Boolean; var TypeData: PTypeData; - Count: LongInt; + Count: Integer; P: PByte; I: Integer; begin