Disable a**b for cdef int's. (Return result was a double.)
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 21 Feb 2007 06:17:26 +0000 (22:17 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 21 Feb 2007 06:17:26 +0000 (22:17 -0800)
Cython/Compiler/ExprNodes.py

index 708dee852cb92cb4ca9cc0a9f3ca94fa313ad4d8..b511b61aa4e9752bed45e10b050ffc02989c953b 100644 (file)
@@ -2514,6 +2514,9 @@ class PowNode(NumBinopNode):
             return PyrexTypes.c_double_type
         else:
             return None
+            
+    def c_types_okay(self, type1, type2):
+        return type1.is_float or type2.is_float
     
     def calculate_result_code(self):
         return "pow(%s, %s)" % (