From ae87153df35ca8a4bd730352e7f1445acae5b9d1 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 20 Feb 2007 22:17:26 -0800 Subject: [PATCH] Disable a**b for cdef int's. (Return result was a double.) --- Cython/Compiler/ExprNodes.py | 3 +++ 1 file changed, 3 insertions(+) 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)" % ( -- 2.26.2