enable type inference in safe mode also for 'bint'
authorStefan Behnel <scoder@users.berlios.de>
Sun, 6 Dec 2009 22:30:46 +0000 (23:30 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 6 Dec 2009 22:30:46 +0000 (23:30 +0100)
Cython/Compiler/TypeInference.py

index d2375ed81f6e6a1e9308cceff78585455eb421ce..c142453667de70e92da8ae7848e7be2d77d6d3fa 100644 (file)
@@ -201,6 +201,9 @@ def find_safe_type(result_type, which_types_to_infer):
             # Python's float type is just a C double, so it's safe to
             # use the C type instead
             return PyrexTypes.c_double_type
+        elif result_type is PyrexTypes.c_bint_type:
+            # 'bint' should behave exactly like Python's bool type ...
+            return PyrexTypes.c_bint_type
     return py_object_type
 
 def get_type_inferer():