Browse Source

Ensure that units loaded from a package are not recompiled if the source files should happen to be available.

fppu.pas, tppumodule:
  loadppu: set the state to ms_compiled instead of ms_load if the unit was loaded from a package (additionally close the PPU file as it's no longer needed)

git-svn-id: branches/svenbarth/packages@29039 -
svenbarth 10 years ago
parent
commit
fd0cd9a615
1 changed files with 8 additions and 1 deletions
  1. 8 1
      compiler/fppu.pas

+ 8 - 1
compiler/fppu.pas

@@ -1784,7 +1784,14 @@ var
           begin
             do_load:=false;
             do_reload:=false;
-            state:=ms_load;
+            state:=ms_compiled;
+            { PPU is not needed anymore }
+            if assigned(ppufile) then
+             begin
+                ppufile.closefile;
+                ppufile.free;
+                ppufile:=nil;
+             end;
             { add the unit to the used units list of the program }
             usedunits.concat(tused_unit.create(self,true,false,nil));
           end;