Another fix to #include ordering
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 25 Feb 2009 09:58:59 +0000 (01:58 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 25 Feb 2009 09:58:59 +0000 (01:58 -0800)
Cython/Compiler/Symtab.py

index 2a24b3d28dcb4cab44730e2638d567ae560449ef..b1fdfac30f828dcd35304f7cf6169d3d9baed96e 100644 (file)
@@ -904,11 +904,11 @@ class ModuleScope(Scope):
     
     def add_imported_module(self, scope):
         if scope not in self.cimported_modules:
+            for filename in scope.include_files:
+                self.add_include_file(filename)
             self.cimported_modules.append(scope)
             for m in scope.cimported_modules:
                 self.add_imported_module(m)
-            for filename in scope.include_files:
-                self.add_include_file(filename)
     
     def add_imported_entry(self, name, entry, pos):
         if entry not in self.entries: