mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 10:19:30 +02:00
merge r16256 from cpstrnew branch by marco:
* fix for cycling with 2.4.x git-svn-id: trunk@19103 -
This commit is contained in:
parent
091627883f
commit
99dae8b97e
@ -261,7 +261,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_WideStr_To_AnsiStr (const S2 : WideString;cp : TSystemCodePage): AnsiString; compilerproc;
|
||||
Function fpc_WideStr_To_AnsiStr (const S2 : WideString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}): AnsiString; compilerproc;
|
||||
{
|
||||
Converts a WideString to an AnsiString
|
||||
}
|
||||
@ -271,7 +271,7 @@ begin
|
||||
result:='';
|
||||
Size:=Length(S2);
|
||||
if Size>0 then
|
||||
widestringmanager.Wide2AnsiMoveProc(PWideChar(Pointer(S2)),result,cp,Size);
|
||||
widestringmanager.Wide2AnsiMoveProc(PWideChar(Pointer(S2)),result,{$ifdef FPC_HAS_CPSTRING}cp{$else}TSystemCodePage(0){$endif FPC_HAS_CPSTRING},Size);
|
||||
end;
|
||||
|
||||
|
||||
@ -504,12 +504,12 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_WChar_To_AnsiStr(const c : WideChar;cp : TSystemCodePage): AnsiString; compilerproc;
|
||||
Function fpc_WChar_To_AnsiStr(const c : WideChar{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}): AnsiString; compilerproc;
|
||||
{
|
||||
Converts a WideChar to a AnsiString;
|
||||
}
|
||||
begin
|
||||
widestringmanager.Wide2AnsiMoveProc(@c, fpc_WChar_To_AnsiStr, cp, 1);
|
||||
widestringmanager.Wide2AnsiMoveProc(@c, fpc_WChar_To_AnsiStr,{$ifdef FPC_HAS_CPSTRING}cp{$else}TSystemCodePage(0){$endif FPC_HAS_CPSTRING}, 1);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user