mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:39:34 +02:00
* fixed compilerwidestring concatenation
git-svn-id: trunk@1876 -
This commit is contained in:
parent
3a8cd257b4
commit
0907a1ef80
@ -558,9 +558,9 @@ implementation
|
|||||||
destructor tstringconstnode.destroy;
|
destructor tstringconstnode.destroy;
|
||||||
begin
|
begin
|
||||||
if st_type=st_widestring then
|
if st_type=st_widestring then
|
||||||
donewidestring(pcompilerwidestring(value_str))
|
donewidestring(pcompilerwidestring(value_str))
|
||||||
else
|
else
|
||||||
ansistringdispose(value_str,len);
|
ansistringdispose(value_str,len);
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ update the codegenerror boolean with the previous result of this node }
|
{ update the codegenerror boolean with the previous result of this node }
|
||||||
if (nf_error in p.flags) then
|
if (nf_error in p.flags) then
|
||||||
codegenerror:=true;
|
codegenerror:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -104,6 +104,7 @@ unit widestr;
|
|||||||
reallocmem(r^.data,sizeof(tcompilerwidechar)*l)
|
reallocmem(r^.data,sizeof(tcompilerwidechar)*l)
|
||||||
else
|
else
|
||||||
getmem(r^.data,sizeof(tcompilerwidechar)*l);
|
getmem(r^.data,sizeof(tcompilerwidechar)*l);
|
||||||
|
r^.maxlen:=l;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure concatwidestringchar(r : pcompilerwidestring;c : tcompilerwidechar);
|
procedure concatwidestringchar(r : pcompilerwidestring;c : tcompilerwidechar);
|
||||||
@ -118,8 +119,8 @@ unit widestr;
|
|||||||
procedure concatwidestrings(s1,s2 : pcompilerwidestring);
|
procedure concatwidestrings(s1,s2 : pcompilerwidestring);
|
||||||
begin
|
begin
|
||||||
setlengthwidestring(s1,s1^.len+s2^.len);
|
setlengthwidestring(s1,s1^.len+s2^.len);
|
||||||
inc(s1^.len,s2^.len);
|
|
||||||
move(s2^.data^,s1^.data[s1^.len],s2^.len*sizeof(tcompilerwidechar));
|
move(s2^.data^,s1^.data[s1^.len],s2^.len*sizeof(tcompilerwidechar));
|
||||||
|
inc(s1^.len,s2^.len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure copywidestring(s,d : pcompilerwidestring);
|
procedure copywidestring(s,d : pcompilerwidestring);
|
||||||
|
Loading…
Reference in New Issue
Block a user