[Pyrex] enum regression 0.9.5?

Anders Gustafsson andersg at 0x63.nu
Sun Jan 28 15:20:30 UTC 2007


I wrote:
> /tmp/Pyrex-0.9.5/regression.pyx:8:11: Invalid types for '=='
> (someenum_t, someenum_t)

This patch seems to help, but I don't know enough pyrex internals to
tell if it is the correct solution.

--- Pyrex-0.9.5/Pyrex/Compiler/ExprNodes.py     2007-01-27
05:21:03.000000000 +0100
+++ Pyrex-0.9.5-enumcmpfix/Pyrex/Compiler/ExprNodes.py  2007-01-28
16:14:45.366599915 +0100
@@ -2594,6 +2594,8 @@
         elif (type1.is_numeric and type2.is_numeric
                 and op not in ('is', 'is_not')):
             return 1
+        elif (type1.is_enum and type2.is_enum):
+            return 1
         else:
             return 0





More information about the Pyrex mailing list