Commit adfe0451 authored by Stefan Behnel's avatar Stefan Behnel

compile Cython.Compiler.ModuleNode module

parent ae8d0889
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
# Pyrex - Module parse tree node # 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 import os, time
from PyrexTypes import CPtrType from PyrexTypes import CPtrType
import Future import Future
try:
set
except NameError: # Python 2.3
from sets import Set as set
import Annotate import Annotate
import Code import Code
import Naming import Naming
...@@ -1658,7 +1659,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1658,7 +1659,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
elif entry.type.from_py_function: elif entry.type.from_py_function:
rhs = "%s(o)" % entry.type.from_py_function rhs = "%s(o)" % entry.type.from_py_function
if entry.type.is_enum: 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;" % ( code.putln("%s = %s; if (%s) %s;" % (
entry.cname, entry.cname,
rhs, rhs,
......
...@@ -93,6 +93,7 @@ def compile_cython_modules(profile=False): ...@@ -93,6 +93,7 @@ def compile_cython_modules(profile=False):
"Cython.Compiler.Visitor", "Cython.Compiler.Visitor",
"Cython.Compiler.ParseTreeTransforms", "Cython.Compiler.ParseTreeTransforms",
"Cython.Compiler.Optimize", "Cython.Compiler.Optimize",
"Cython.Compiler.ModuleNode",
"Cython.Runtime.refnanny"] "Cython.Runtime.refnanny"]
extensions = [] extensions = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment