Put cimported includes first.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 22 Nov 2008 00:05:28 +0000 (16:05 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 22 Nov 2008 00:05:28 +0000 (16:05 -0800)
Cython/Compiler/ModuleNode.py

index e2866249ceb6e4e315e775bea57dda8b0b963bf4..3d0f1805dece23ac03c835d6323aaa07e69144e7 100644 (file)
@@ -545,11 +545,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         code.putln("#endif")
 
     def generate_includes(self, env, cimported_modules, code):
-        includes = env.include_files[:]
+        includes = []
         for module in cimported_modules:
             for filename in module.include_files:
                 if filename not in includes:
                     includes.append(filename)
+        for filename in env.include_files[:]
+            if filename not in includes:
+                includes.append(filename)
         for filename in includes:
             code.putln('#include "%s"' % filename)