Browse Source

Integers are 16-bit in system, replace with SizeInt.

Rika Ichinose 1 year ago
parent
commit
b0076a4709
2 changed files with 9 additions and 9 deletions
  1. 3 3
      rtl/inc/ustringh.inc
  2. 6 6
      rtl/inc/ustrings.inc

+ 3 - 3
rtl/inc/ustringh.inc

@@ -51,11 +51,11 @@ procedure UnicodeCharLenToStrVar(Src : PUnicodeChar;Len : SizeInt;out Dest : Ans
 procedure UnicodeCharToStrVar(S : PUnicodeChar;out Dest : AnsiString);
 
 function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
-  LocaleStrLen: Integer; UnicodeStr: PWideChar; UnicodeStrLen: Integer): Integer; overload;
+  LocaleStrLen: SizeInt; UnicodeStr: PWideChar; UnicodeStrLen: SizeInt): SizeInt; overload;
 
 function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
-  LocaleStr: PAnsiChar; LocaleStrLen: Integer; UnicodeStr: PWideChar;
-  UnicodeStrLen: Integer): Integer; overload;
+  LocaleStr: PAnsiChar; LocaleStrLen: SizeInt; UnicodeStr: PWideChar;
+  UnicodeStrLen: SizeInt): SizeInt; overload;
 
 
 procedure DefaultUnicode2AnsiMove(source:punicodechar;var dest:RawByteString;cp : TSystemCodePage;len:SizeInt);

+ 6 - 6
rtl/inc/ustrings.inc

@@ -1044,7 +1044,7 @@ function StringToWideChar(const Src : RawByteString;Dest : PWideChar;DestSize :
 {$ifndef FPC_HAS_UNICODEFROMLOCALECHARS}
 {$define FPC_HAS_UNICODEFROMLOCALECHARS}
 function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
-  LocaleStrLen: Integer; UnicodeStr: PWideChar; UnicodeStrLen: Integer): Integer; overload;
+  LocaleStrLen: SizeInt; UnicodeStr: PWideChar; UnicodeStrLen: SizeInt): SizeInt; overload;
 
 var
   temp: widestring;
@@ -1066,8 +1066,8 @@ end;
 {$endif ndef FPC_HAS_UNICODEFROMLOCALECHARS}
 
 function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
-  LocaleStr: PAnsiChar; LocaleStrLen: Integer; UnicodeStr: PWideChar;
-  UnicodeStrLen: Integer): Integer; overload;
+  LocaleStr: PAnsiChar; LocaleStrLen: SizeInt; UnicodeStr: PWideChar;
+  UnicodeStrLen: SizeInt): SizeInt; overload;
 
 var
   CP : TSystemCodePage;
@@ -2405,7 +2405,7 @@ end;
 function UTF8ToString(const S: PAnsiChar): UnicodeString;
 var
   rs: RawByteString;
-  Count: Integer;
+  Count: SizeInt;
 begin
   Count := length(S);
   SetLength(rs, Count);
@@ -2426,7 +2426,7 @@ end;
 function UTF8ToString(const S: array of AnsiChar): UnicodeString;
 var
   rs: RawByteString;
-  Count: Integer;
+  Count: SizeInt;
 begin
   Count := Length(S);
   SetLength(rs, Count);
@@ -2438,7 +2438,7 @@ end;
 function UTF8ToString(const S: array of Byte): UnicodeString;
 var
   rs: RawByteString;
-  Count: Integer;
+  Count: SizeInt;
 begin
   Count := Length(S);
   SetLength(rs, Count);