mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:09:26 +02:00
* let is_conststringnode() and is_constwidestringnode() also recognise string
constants that have a stringdef as resultdef git-svn-id: trunk@32969 -
This commit is contained in:
parent
53052f26a0
commit
9ace5ad038
@ -711,13 +711,18 @@ implementation
|
|||||||
function is_conststringnode(p : tnode) : boolean;
|
function is_conststringnode(p : tnode) : boolean;
|
||||||
begin
|
begin
|
||||||
is_conststringnode :=
|
is_conststringnode :=
|
||||||
(p.nodetype = stringconstn) and is_chararray(p.resultdef);
|
(p.nodetype = stringconstn) and
|
||||||
|
(is_chararray(p.resultdef) or
|
||||||
|
is_shortstring(p.resultdef) or
|
||||||
|
is_ansistring(p.resultdef));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function is_constwidestringnode(p : tnode) : boolean;
|
function is_constwidestringnode(p : tnode) : boolean;
|
||||||
begin
|
begin
|
||||||
is_constwidestringnode :=
|
is_constwidestringnode :=
|
||||||
(p.nodetype = stringconstn) and is_widechararray(p.resultdef);
|
(p.nodetype = stringconstn) and
|
||||||
|
(is_widechararray(p.resultdef) or
|
||||||
|
is_wide_or_unicode_string(p.resultdef));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function is_conststring_or_constcharnode(p : tnode) : boolean;
|
function is_conststring_or_constcharnode(p : tnode) : boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user