mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:39:31 +02:00
merge r17330 from cpstrnew branch by michael:
* Patch from inoussa to handle pwchararray to ansistr git-svn-id: trunk@19106 -
This commit is contained in:
parent
fbc01291c4
commit
29c6b034aa
@ -920,6 +920,29 @@ implementation
|
||||
addstatement(newstat,ctemprefnode.create(restemp));
|
||||
result:=newblock;
|
||||
end
|
||||
else if is_widechar(tarraydef(left.resultdef).elementdef) and
|
||||
(tstringdef(resultdef).stringtype=st_ansistring) then
|
||||
begin
|
||||
result:=ccallnode.createinternres(
|
||||
'fpc_'+chartype+'array_to_'+tstringdef(resultdef).stringtypname,
|
||||
ccallparanode.create(
|
||||
cordconstnode.create(
|
||||
ord(tarraydef(left.resultdef).lowrange=0),
|
||||
booltype,
|
||||
false
|
||||
),
|
||||
ccallparanode.create(
|
||||
cordconstnode.create(
|
||||
tstringdef(resultdef).encoding,
|
||||
u16inttype,
|
||||
true
|
||||
),
|
||||
ccallparanode.create(left,nil)
|
||||
)
|
||||
),
|
||||
resultdef
|
||||
);
|
||||
end
|
||||
else
|
||||
result:=ccallnode.createinternres(
|
||||
'fpc_'+chartype+'array_to_'+tstringdef(resultdef).stringtypname,
|
||||
|
Loading…
Reference in New Issue
Block a user