Browse Source

* one more unitsym problem fix

pierre 26 years ago
parent
commit
8e6fc5fcf0
1 changed files with 21 additions and 4 deletions
  1. 21 4
      compiler/symtable.pas

+ 21 - 4
compiler/symtable.pas

@@ -991,8 +991,13 @@ const localsymtablestack : psymtable = nil;
 {$ifndef OLDPPU}
 {$ifndef OLDPPU}
          new(symindex,init(indexgrowsize));
          new(symindex,init(indexgrowsize));
          new(defindex,init(indexgrowsize));
          new(defindex,init(indexgrowsize));
-         new(symsearch,init);
-         symsearch^.noclear:=true;
+         if symtabletype<>withsymtable then
+           begin
+              new(symsearch,init);
+              symsearch^.noclear:=true;
+           end
+         else
+           symsearch:=nil;
 {$else}
 {$else}
          lastsym:=nil;
          lastsym:=nil;
          rootdef:=nil;
          rootdef:=nil;
@@ -2659,8 +2664,17 @@ const localsymtablestack : psymtable = nil;
 
 
 
 
      destructor tunitsymtable.done;
      destructor tunitsymtable.done;
+       var
+          pus : punitsym;
        begin
        begin
-          unitsym:=nil;
+          pus:=unitsym;
+          while assigned(pus) do
+            begin
+               unitsym:=pus^.prevsym;
+               pus^.prevsym:=nil;
+               pus^.unitsymtable:=nil;
+               pus:=unitsym;
+            end;
           inherited done;
           inherited done;
        end;
        end;
        
        
@@ -3224,7 +3238,10 @@ const localsymtablestack : psymtable = nil;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.11  1999-05-10 15:02:51  pierre
+  Revision 1.12  1999-05-10 22:34:59  pierre
+   * one more unitsym problem fix
+
+  Revision 1.11  1999/05/10 15:02:51  pierre
   unitsym finally problem fixed
   unitsym finally problem fixed
 
 
   Revision 1.10  1999/05/09 12:46:26  peter
   Revision 1.10  1999/05/09 12:46:26  peter