Browse Source

Some small fixes for package parsing.

pmodules.pas, proc_package:
  * use orgpattern instead of pattern to build the module name (like is done in uses sections)
  * ignore duplicates when generating exports
  - no need to generate an import library for the package; that is done by the program/library that uses the package

git-svn-id: branches/svenbarth/packages@28841 -
svenbarth 10 years ago
parent
commit
f4e17dd8c1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      compiler/pmodules.pas

+ 4 - 4
compiler/pmodules.pas

@@ -1406,7 +1406,7 @@ type
                begin
                  if token=_ID then
                    begin
-                     module_name:=pattern;
+                     module_name:=orgpattern;
                      consume(_ID);
                      while token=_POINT do
                        begin
@@ -1500,6 +1500,8 @@ type
               loaded_units.remove(hp2);
           end;
 
+         exportlib.ignoreduplicates:=true;
+
          { force exports }
          uu:=tused_unit(usedunits.first);
          while assigned(uu) do
@@ -1522,9 +1524,7 @@ type
 
          exportlib.generatelib;
 
-         { write all our exports to the import library,
-           needs to be done after exportlib.generatelib; }
-         createimportlibfromexports;
+         exportlib.ignoreduplicates:=false;
 
          { generate imports }
          if current_module.ImportLibraryList.Count>0 then