mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:29:33 +02:00
* 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:
parent
fcc56d271a
commit
a9515e9446
@ -695,11 +695,16 @@ implementation
|
|||||||
hsym:=tconstsym(tloadnode(n).symtableentry);
|
hsym:=tconstsym(tloadnode(n).symtableentry);
|
||||||
strval:=pchar(hsym.value.valueptr);
|
strval:=pchar(hsym.value.valueptr);
|
||||||
strlength:=hsym.value.len;
|
strlength:=hsym.value.len;
|
||||||
{ Link the string constant to its initializing resourcestring,
|
{ Delphi-compatible (mis)feature:
|
||||||
enabling it to be (re)translated at runtime.
|
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
|
if (not is_shortstring(def)) and
|
||||||
(hr.origblock=bt_const) then
|
((hr.origsym.owner.symtablelevel<=main_program_level) or
|
||||||
|
(hr.origblock=bt_const)) then
|
||||||
begin
|
begin
|
||||||
current_asmdata.ResStrInits.Concat(
|
current_asmdata.ResStrInits.Concat(
|
||||||
TTCInitItem.Create(hr.origsym,hr.offset,
|
TTCInitItem.Create(hr.origsym,hr.offset,
|
||||||
|
Loading…
Reference in New Issue
Block a user