From: Robert Bradshaw Date: Sat, 29 Mar 2008 20:03:23 +0000 (-0700) Subject: Fix comparison bug for longs and doubles #208053 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=93b894bd8561284940933c1cee5d23f9f168b208;p=cython.git Fix comparison bug for longs and doubles #208053 --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index b75178a8..63be9d61 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -3338,6 +3338,8 @@ class CmpNode: if (type1.is_extension_type or type2.is_extension_type) \ and not type1.same_as(type2): common_type = py_object_type + elif type1.is_numeric: + common_type = PyrexTypes.widest_numeric_type(type1, type2) else: common_type = type1 code1 = operand1.result_as(common_type)