From 14beaf2dd6c5635645bda9f6dcbc281891ff34ac Mon Sep 17 00:00:00 2001 From: William Stein Date: Sat, 28 Jul 2007 13:18:27 -0700 Subject: [PATCH] Merge in lxml-pyrex enum patch. --- Cython/Compiler/ExprNodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 96df5edb..7edea447 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2478,6 +2478,10 @@ class NumBinopNode(BinopNode): def analyse_c_operation(self, env): type1 = self.operand1.type type2 = self.operand2.type + if type1.is_enum: + type1 = PyrexTypes.c_int_type + if type2.is_enum: + type2 = PyrexTypes.c_int_type self.type = self.compute_c_result_type(type1, type2) if not self.type: self.type_error() -- 2.26.2