From: Dag Sverre Seljebotn Date: Sat, 2 Aug 2008 07:48:29 +0000 (+0200) Subject: Fix utility code requested from pxds X-Git-Tag: 0.9.8.1~49^2~33 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6b8a8dbe67b558a16f9da25e19d6ee7c4a463b53;p=cython.git Fix utility code requested from pxds --- 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 ([