From: Robert Bradshaw Date: Sat, 22 Nov 2008 00:05:28 +0000 (-0800) Subject: Put cimported includes first. X-Git-Tag: 0.11-beta~226^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2e945c76d39c048ed2a92f70aa9dbbc6db3c9f3e;p=cython.git Put cimported includes first. --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index e2866249..3d0f1805 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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)