From: William Stein Date: Sat, 28 Jul 2007 20:18:27 +0000 (-0700) Subject: Merge in lxml-pyrex enum patch. X-Git-Tag: 0.9.6.14~29^2~172 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=14beaf2dd6c5635645bda9f6dcbc281891ff34ac;p=cython.git Merge in lxml-pyrex enum patch. --- 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()