From adfe04515a974f33e3e349ae5b55b126fd4cdea9 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 26 Nov 2010 13:42:34 +0100 Subject: [PATCH] compile Cython.Compiler.ModuleNode module --- Cython/Compiler/ModuleNode.py | 13 +++++++------ setup.py | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 8d8344c1..5a843e96 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2,15 +2,16 @@ # Pyrex - Module parse tree node # +import cython +from cython import set +cython.declare(Naming=object, Options=object, PyrexTypes=object, TypeSlots=object, + error=object, warning=object, py_object_type=object, UtilityCode=object, + escape_byte_string=object, EncodedString=object) + import os, time from PyrexTypes import CPtrType import Future -try: - set -except NameError: # Python 2.3 - from sets import Set as set - import Annotate import Code import Naming @@ -1658,7 +1659,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): elif entry.type.from_py_function: rhs = "%s(o)" % entry.type.from_py_function if entry.type.is_enum: - rhs = typecast(entry.type, c_long_type, rhs) + rhs = PyrexTypes.typecast(entry.type, PyrexTypes.c_long_type, rhs) code.putln("%s = %s; if (%s) %s;" % ( entry.cname, rhs, diff --git a/setup.py b/setup.py index 4ebe4fc1..29ddfc42 100644 --- a/setup.py +++ b/setup.py @@ -93,6 +93,7 @@ def compile_cython_modules(profile=False): "Cython.Compiler.Visitor", "Cython.Compiler.ParseTreeTransforms", "Cython.Compiler.Optimize", + "Cython.Compiler.ModuleNode", "Cython.Runtime.refnanny"] extensions = [] -- 2.26.2