Browse Source

+ Fix for win32 cycle

michael 21 years ago
parent
commit
4963306976
1 changed files with 7 additions and 4 deletions
  1. 7 4
      compiler/systems/t_win32.pas

+ 7 - 4
compiler/systems/t_win32.pas

@@ -141,12 +141,12 @@ implementation
               current_module.imports.concat(hp1);
               current_module.imports.concat(hp1);
            end;
            end;
          { search for reuse of old import item }
          { search for reuse of old import item }
-         if name<>'' then
+         if assigned(aprocdef) then
            begin
            begin
              hp2:=twin32imported_item(hp1.imported_items.first);
              hp2:=twin32imported_item(hp1.imported_items.first);
              while assigned(hp2) do
              while assigned(hp2) do
               begin
               begin
-                if (hp2.name^=name) then
+                if (hp2.procdef=aprocdef) then
                   break;
                   break;
                 hp2:=twin32imported_item(hp2.next);
                 hp2:=twin32imported_item(hp2.next);
               end;
               end;
@@ -156,7 +156,7 @@ implementation
              hp2:=twin32imported_item(hp1.imported_items.first);
              hp2:=twin32imported_item(hp1.imported_items.first);
              while assigned(hp2) do
              while assigned(hp2) do
               begin
               begin
-                if (hp2.ordnr=index) then
+                if (hp2.func^=func) then
                   break;
                   break;
                 hp2:=twin32imported_item(hp2.next);
                 hp2:=twin32imported_item(hp2.next);
               end;
               end;
@@ -1623,7 +1623,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.44  2004-11-17 22:22:12  peter
+  Revision 1.45  2004-11-18 10:06:19  michael
+  + Fix for win32 cycle
+
+  Revision 1.44  2004/11/17 22:22:12  peter
   mangledname setting moved to place after the complete proc declaration is read
   mangledname setting moved to place after the complete proc declaration is read
   import generation moved to place where body is also parsed (still gives problems with win32)
   import generation moved to place where body is also parsed (still gives problems with win32)