37
37
{ $ELSE}
38
38
{ $IF CompilerVersion >= 24.0} // XE3 or newer
39
39
{ $LEGACYIFEND ON}
40
+ { $IF CompilerVersion >= 35.0} // 11.0
41
+ { $DEFINE USE_NATIVEINT}
42
+ { $IFEND}
40
43
{ $IFEND}
41
44
{ $IF CompilerVersion >= 23.0}
42
45
{ $DEFINE HAS_UNIT_SCOPE}
@@ -1078,11 +1081,7 @@ TJsonUTF8StringStream = class(TMemoryStream)
1078
1081
private
1079
1082
FDataString: UTF8String;
1080
1083
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;
1086
1085
public
1087
1086
constructor Create;
1088
1087
property DataString: UTF8String read FDataString;
@@ -1093,11 +1092,7 @@ TJsonBytesStream = class(TMemoryStream)
1093
1092
private
1094
1093
FBytes: TBytes;
1095
1094
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;
1101
1096
public
1102
1097
constructor Create;
1103
1098
property Bytes: TBytes read FBytes;
@@ -8241,13 +8236,9 @@ constructor TJsonUTF8StringStream.Create;
8241
8236
SetPointer(nil , 0 );
8242
8237
end ;
8243
8238
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;
8249
8240
var
8250
- L: Longint;
8241
+ L: { $IF Defined(USE_NATIVEINT) } NativeInt { $ELSE } Longint{ $IFEND } ;
8251
8242
begin
8252
8243
if NewCapacity <> Capacity then
8253
8244
begin
@@ -8283,13 +8274,9 @@ constructor TJsonBytesStream.Create;
8283
8274
SetPointer(nil , 0 );
8284
8275
end ;
8285
8276
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;
8291
8278
var
8292
- L: Longint;
8279
+ L: { $IF Defined(USE_NATIVEINT) } NativeInt { $ELSE } Longint{ $IFEND } ;
8293
8280
begin
8294
8281
if NewCapacity <> Capacity then
8295
8282
begin
0 commit comments