mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 02:49:32 +01:00
compiler: use globalsymtable for units to store ansistring replacement def (fixes bug #0020529)
git-svn-id: trunk@19523 -
This commit is contained in:
parent
5d7d143300
commit
110119e398
@ -861,6 +861,8 @@ implementation
|
||||
end;
|
||||
|
||||
function getansistringdef:tstringdef; inline;
|
||||
var
|
||||
symtable:tsymtable;
|
||||
begin
|
||||
{ if codepage is explicitly defined in this mudule we need to return
|
||||
a replacement for ansistring def }
|
||||
@ -873,9 +875,13 @@ implementation
|
||||
if not assigned(current_module.ansistrdef) then
|
||||
begin
|
||||
{ if we did not create it yet we need to do this now }
|
||||
symtablestack.push(current_module.localsymtable);
|
||||
if current_module.is_unit then
|
||||
symtable:=current_module.globalsymtable
|
||||
else
|
||||
symtable:=current_module.localsymtable;
|
||||
symtablestack.push(symtable);
|
||||
current_module.ansistrdef:=tstringdef.createansi(current_settings.sourcecodepage);
|
||||
symtablestack.pop(current_module.localsymtable);
|
||||
symtablestack.pop(symtable);
|
||||
end;
|
||||
result:=tstringdef(current_module.ansistrdef);
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user