Another IntNode fix.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 27 May 2010 04:41:40 +0000 (21:41 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 27 May 2010 04:41:40 +0000 (21:41 -0700)
Cython/Compiler/ExprNodes.py

index ad266fd4471655f42ef68fe73e7d2954b3dabb98..b2f3dfea63888b85c6ef8c9d094a3be7f80b85d6 100755 (executable)
@@ -790,9 +790,10 @@ class IntNode(ConstNode):
 
     def __init__(self, pos, **kwds):
         ExprNode.__init__(self, pos, **kwds)
-        rank = max(1, len(self.longness))
-        sign = not self.unsigned
-        self.type = PyrexTypes.modifiers_and_name_to_type[sign, rank, "int"]
+        if 'type' not in kwds:
+            rank = max(1, len(self.longness))
+            sign = not self.unsigned
+            self.type = PyrexTypes.modifiers_and_name_to_type[sign, rank, "int"]
 
     def coerce_to(self, dst_type, env):
         if self.type is dst_type: