Skip to content

Commit 7e51ab4

Browse files
Merge branch 'master' into dpm-support
# Conflicts: # Source/JsonDataObjects.pas
2 parents a749926 + 0ea4b5b commit 7e51ab4

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

Source/JsonDataObjects.pas

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
{$ELSE}
3838
{$IF CompilerVersion >= 24.0} // XE3 or newer
3939
{$LEGACYIFEND ON}
40+
{$IF CompilerVersion >= 35.0} //11.0
41+
{$DEFINE USE_NATIVEINT}
42+
{$IFEND}
4043
{$IFEND}
4144
{$IF CompilerVersion >= 23.0}
4245
{$DEFINE HAS_UNIT_SCOPE}
@@ -1078,11 +1081,7 @@ TJsonUTF8StringStream = class(TMemoryStream)
10781081
private
10791082
FDataString: UTF8String;
10801083
protected
1081-
{$IF CompilerVersion >= 35.0}
1082-
function Realloc(var NewCapacity: NativeInt): Pointer; override;
1083-
{$ELSE}
1084-
function Realloc(var NewCapacity: Longint): Pointer; override;
1085-
{$IFEND}
1084+
function Realloc(var NewCapacity: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND}): Pointer; override;
10861085
public
10871086
constructor Create;
10881087
property DataString: UTF8String read FDataString;
@@ -1093,11 +1092,7 @@ TJsonBytesStream = class(TMemoryStream)
10931092
private
10941093
FBytes: TBytes;
10951094
protected
1096-
{$IF CompilerVersion >= 35.0}
1097-
function Realloc(var NewCapacity: NativeInt): Pointer; override;
1098-
{$ELSE}
1099-
function Realloc(var NewCapacity: Longint): Pointer; override;
1100-
{$IFEND}
1095+
function Realloc(var NewCapacity: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND}): Pointer; override;
11011096
public
11021097
constructor Create;
11031098
property Bytes: TBytes read FBytes;
@@ -8241,13 +8236,9 @@ constructor TJsonUTF8StringStream.Create;
82418236
SetPointer(nil, 0);
82428237
end;
82438238

8244-
{$IF CompilerVersion >= 35.0}
8245-
function TJsonUTF8StringStream.Realloc(var NewCapacity: NativeInt): Pointer;
8246-
{$ELSE}
8247-
function TJsonUTF8StringStream.Realloc(var NewCapacity: Longint): Pointer;
8248-
{$IFEND}
8239+
function TJsonUTF8StringStream.Realloc(var NewCapacity: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND}): Pointer;
82498240
var
8250-
L: Longint;
8241+
L: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND};
82518242
begin
82528243
if NewCapacity <> Capacity then
82538244
begin
@@ -8283,13 +8274,9 @@ constructor TJsonBytesStream.Create;
82838274
SetPointer(nil, 0);
82848275
end;
82858276

8286-
{$IF CompilerVersion >= 35.0}
8287-
function TJsonBytesStream.Realloc(var NewCapacity: NativeInt): Pointer;
8288-
{$ELSE}
8289-
function TJsonBytesStream.Realloc(var NewCapacity: Longint): Pointer;
8290-
{$IFEND}
8277+
function TJsonBytesStream.Realloc(var NewCapacity: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND}): Pointer;
82918278
var
8292-
L: Longint;
8279+
L: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND};
82938280
begin
82948281
if NewCapacity <> Capacity then
82958282
begin

0 commit comments

Comments
 (0)