From 2e945c76d39c048ed2a92f70aa9dbbc6db3c9f3e Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 21 Nov 2008 16:05:28 -0800 Subject: [PATCH] Put cimported includes first. --- Cython/Compiler/ModuleNode.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.26.2