From 93b894bd8561284940933c1cee5d23f9f168b208 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 29 Mar 2008 13:03:23 -0700 Subject: [PATCH] Fix comparison bug for longs and doubles #208053 --- Cython/Compiler/ExprNodes.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.26.2