From 6b8a8dbe67b558a16f9da25e19d6ee7c4a463b53 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Sat, 2 Aug 2008 09:48:29 +0200 Subject: [PATCH] Fix utility code requested from pxds --- Cython/Compiler/Main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index ddcd1fe4..2e994148 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -113,7 +113,14 @@ class Context: from textwrap import dedent stats = module_node.body.stats for name, (statlistnode, scope) in self.pxds.iteritems(): + # Copy over function nodes to the module + # (this seems strange -- I believe the right concept is to split + # ModuleNode into a ModuleNode and a CodeGenerator, and tell that + # CodeGenerator to generate code both from the pyx and pxd ModuleNodes. stats.append(statlistnode) + # Until utility code is moved to code generation phase everywhere, + # we need to copy it over to the main scope + module_node.scope.utility_code_list.extend(scope.utility_code_list) return module_node return ([ -- 2.26.2