* reset aktfilepos when setting new module for compile

This commit is contained in:
peter 2003-04-26 00:30:52 +00:00
parent 2b888374ce
commit 6720314fc5
2 changed files with 18 additions and 5 deletions

View File

@ -1133,6 +1133,7 @@ uses
second_time:=false; second_time:=false;
current_module:=self; current_module:=self;
SetCompileModule(current_module); SetCompileModule(current_module);
Fillchar(aktfilepos,0,sizeof(aktfilepos));
{ we are loading a new module, save the state of the scanner { we are loading a new module, save the state of the scanner
and reset scanner+module } and reset scanner+module }
@ -1258,7 +1259,12 @@ uses
current_module:=old_current_module; current_module:=old_current_module;
current_scanner:=tscannerfile(current_module.scanner); current_scanner:=tscannerfile(current_module.scanner);
if assigned(current_scanner) then if assigned(current_scanner) then
begin
current_scanner.tempopeninputfile; current_scanner.tempopeninputfile;
current_scanner.gettokenpos;
end
else
fillchar(aktfilepos,sizeof(aktfilepos),0);
SetCompileModule(current_module); SetCompileModule(current_module);
end; end;
@ -1332,7 +1338,10 @@ uses
end. end.
{ {
$Log$ $Log$
Revision 1.30 2003-03-27 17:44:13 peter Revision 1.31 2003-04-26 00:30:52 peter
* reset aktfilepos when setting new module for compile
Revision 1.30 2003/03/27 17:44:13 peter
* fixed small mem leaks * fixed small mem leaks
Revision 1.29 2002/12/29 14:57:50 peter Revision 1.29 2002/12/29 14:57:50 peter

View File

@ -402,8 +402,9 @@ implementation
loaded_units.insert(current_module); loaded_units.insert(current_module);
{ Set the module to use for verbose } { Set the module to use for verbose }
SetCompileModule(current_module);
compiled_module:=current_module; compiled_module:=current_module;
SetCompileModule(current_module);
Fillchar(aktfilepos,0,sizeof(aktfilepos));
{ Load current state from the init values } { Load current state from the init values }
aktlocalswitches:=initlocalswitches; aktlocalswitches:=initlocalswitches;
@ -625,7 +626,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.49 2003-04-25 20:59:33 peter Revision 1.50 2003-04-26 00:30:52 peter
* reset aktfilepos when setting new module for compile
Revision 1.49 2003/04/25 20:59:33 peter
* removed funcretn,funcretsym, function result is now in varsym * removed funcretn,funcretsym, function result is now in varsym
and aliases for result and function name are added using absolutesym and aliases for result and function name are added using absolutesym
* vs_hidden parameter for funcret passed in parameter * vs_hidden parameter for funcret passed in parameter