mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 11:29:16 +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;
|
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
|
Converts a WideString to an AnsiString
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@ begin
|
|||||||
result:='';
|
result:='';
|
||||||
Size:=Length(S2);
|
Size:=Length(S2);
|
||||||
if Size>0 then
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -504,12 +504,12 @@ begin
|
|||||||
end;
|
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;
|
Converts a WideChar to a AnsiString;
|
||||||
}
|
}
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user