mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 00:10:19 +02:00
* another windows widestring fix
git-svn-id: trunk@3478 -
This commit is contained in:
parent
631e84dcb4
commit
6996081cd2
@ -177,8 +177,9 @@ Procedure DisposeWideString(Var S : Pointer);
|
||||
begin
|
||||
If S=Nil then
|
||||
exit;
|
||||
{$ifndef MSWINDOWS}
|
||||
Dec (S,WideFirstOff);
|
||||
{$ifdef MSWINDOWS}
|
||||
{$else MSWINDOWS}
|
||||
if winwidestringalloc then
|
||||
SysFreeString(S)
|
||||
else
|
||||
@ -423,7 +424,8 @@ begin
|
||||
NewSize:=0;
|
||||
for i:=low(sarr) to high(sarr) do
|
||||
inc(Newsize,length(sarr[i]));
|
||||
SetLength(result,NewSize);
|
||||
SetLength
|
||||
(result,NewSize);
|
||||
pc:=pwidechar(result);
|
||||
for i:=low(sarr) to high(sarr) do
|
||||
begin
|
||||
@ -464,6 +466,7 @@ begin
|
||||
widestringmanager.Ansi2WideMoveProc(P,fpc_PChar_To_WideStr,l);
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_CharArray_To_WideStr(const arr: array of char; zerobased: boolean = true): WideString; compilerproc;
|
||||
var
|
||||
i : SizeInt;
|
||||
@ -706,7 +709,9 @@ begin
|
||||
;
|
||||
{ Force nil termination in case it gets shorter }
|
||||
PWord(Pointer(S)+l*sizeof(WideChar))^:=0;
|
||||
{$ifndef FPC_WINLIKEWIDESTRING}
|
||||
PWideRec(Pointer(S)-FirstOff)^.Len:=l*sizeof(WideChar);
|
||||
{$endif FPC_WINLIKEWIDESTRING}
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user