* Don't include ShortString constants into resourcestring reference table, because current design allows RTL to handle only a single string type.

git-svn-id: trunk@19038 -
This commit is contained in:
sergei 2011-09-09 17:58:32 +00:00
parent fcc56d271a
commit a9515e9446

View File

@ -695,11 +695,16 @@ implementation
hsym:=tconstsym(tloadnode(n).symtableentry);
strval:=pchar(hsym.value.valueptr);
strlength:=hsym.value.len;
{ Link the string constant to its initializing resourcestring,
enabling it to be (re)translated at runtime.
{ Delphi-compatible (mis)feature:
Link AnsiString constants to their initializing resourcestring,
enabling them to be (re)translated at runtime.
Wide/UnicodeString are currently rejected above (with incorrect error message).
ShortStrings cannot be handled unless another table is built for them;
considering this acceptable, because Delphi rejects them altogether.
}
if (hr.origsym.owner.symtablelevel<=main_program_level) or
(hr.origblock=bt_const) then
if (not is_shortstring(def)) and
((hr.origsym.owner.symtablelevel<=main_program_level) or
(hr.origblock=bt_const)) then
begin
current_asmdata.ResStrInits.Concat(
TTCInitItem.Create(hr.origsym,hr.offset,