From: Stefan Behnel Date: Sun, 6 Dec 2009 22:30:46 +0000 (+0100) Subject: enable type inference in safe mode also for 'bint' X-Git-Tag: 0.12.1~64 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9bdaee376389c255ed07f2e8daefa2a37a880c68;p=cython.git enable type inference in safe mode also for 'bint' --- diff --git a/Cython/Compiler/TypeInference.py b/Cython/Compiler/TypeInference.py index d2375ed8..c1424536 100644 --- a/Cython/Compiler/TypeInference.py +++ b/Cython/Compiler/TypeInference.py @@ -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():