projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9266b95
)
Merge in lxml-pyrex enum patch.
author
William Stein
<wstein@gmail.com>
Sat, 28 Jul 2007 20:18:27 +0000
(13:18 -0700)
committer
William Stein
<wstein@gmail.com>
Sat, 28 Jul 2007 20:18:27 +0000
(13:18 -0700)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 96df5edbabba4d32f8ddbcc4e0ab3ac7d516a32c..7edea44707fc7a5bade38cc3f6e2d755e8f49aa0 100644
(file)
--- 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()