mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 09:39:13 +02:00
Fix post_load_or_compile tppumodule method for SHORT_ON_FILE_HANDLES code by adding from_module parameter
Fixes compilation of text mode IDE for go32v2 target.
This commit is contained in:
parent
0fb4fca957
commit
9db42f5e67
@ -265,7 +265,7 @@ begin
|
||||
ms_registered : parser.compile_module(m);
|
||||
ms_compile : parser.compile_module(m);
|
||||
ms_compiled : if (not m.is_initial) or m.is_unit then
|
||||
(m as tppumodule).post_load_or_compile(m.compilecount>1);
|
||||
(m as tppumodule).post_load_or_compile(m,m.compilecount>1);
|
||||
ms_compiling_waitintf : pmodules.parse_unit_interface_declarations(m);
|
||||
ms_compiling_waitimpl : pmodules.proc_unit_implementation(m);
|
||||
ms_compiling_waitfinish : pmodules.finish_unit(m);
|
||||
|
@ -70,7 +70,7 @@ interface
|
||||
procedure getppucrc;
|
||||
procedure writeppu;
|
||||
function loadppu(from_module : tmodule) : boolean;
|
||||
procedure post_load_or_compile(second_time: boolean);
|
||||
procedure post_load_or_compile(from_module : tmodule; second_time: boolean);
|
||||
procedure discardppu;
|
||||
function needrecompile:boolean;
|
||||
procedure setdefgeneration;
|
||||
@ -2260,7 +2260,7 @@ var
|
||||
setdefgeneration;
|
||||
end;
|
||||
|
||||
procedure tppumodule.post_load_or_compile(second_time : boolean);
|
||||
procedure tppumodule.post_load_or_compile(from_module : tmodule; second_time : boolean);
|
||||
|
||||
begin
|
||||
if current_module<>self then
|
||||
@ -2276,9 +2276,9 @@ var
|
||||
|
||||
{ reopen the old module }
|
||||
{$ifdef SHORT_ON_FILE_HANDLES}
|
||||
if old_current_module.is_unit and
|
||||
assigned(tppumodule(old_current_module).ppufile) then
|
||||
tppumodule(old_current_module).ppufile.tempopen;
|
||||
if from_module.is_unit and
|
||||
assigned(tppumodule(from_module).ppufile) then
|
||||
tppumodule(from_module).ppufile.tempopen;
|
||||
{$endif SHORT_ON_FILE_HANDLES}
|
||||
state:=ms_processed;
|
||||
end;
|
||||
@ -2331,9 +2331,9 @@ var
|
||||
{ close old_current_ppu on system that are
|
||||
short on file handles like DOS PM }
|
||||
{$ifdef SHORT_ON_FILE_HANDLES}
|
||||
if old_current_module.is_unit and
|
||||
assigned(tppumodule(old_current_module).ppufile) then
|
||||
tppumodule(old_current_module).ppufile.tempclose;
|
||||
if from_module.is_unit and
|
||||
assigned(tppumodule(from_module).ppufile) then
|
||||
tppumodule(from_module).ppufile.tempclose;
|
||||
{$endif SHORT_ON_FILE_HANDLES}
|
||||
|
||||
{ try to opening ppu, skip this when we already
|
||||
@ -2354,7 +2354,7 @@ var
|
||||
// usedunits.concat(tused_unit.create(self,true,false,nil));
|
||||
|
||||
if result then
|
||||
post_load_or_compile(second_time);
|
||||
post_load_or_compile(from_module,second_time);
|
||||
|
||||
{ we are back, restore current_module }
|
||||
set_current_module(from_module);
|
||||
|
Loading…
Reference in New Issue
Block a user