From: Robert Bradshaw Date: Wed, 21 Feb 2007 06:17:26 +0000 (-0800) Subject: Disable a**b for cdef int's. (Return result was a double.) X-Git-Tag: 0.9.6.14~29^2~198 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ae87153df35ca8a4bd730352e7f1445acae5b9d1;p=cython.git Disable a**b for cdef int's. (Return result was a double.) --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 708dee85..b511b61a 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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)" % (