From 9bdaee376389c255ed07f2e8daefa2a37a880c68 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 6 Dec 2009 23:30:46 +0100 Subject: [PATCH] enable type inference in safe mode also for 'bint' --- Cython/Compiler/TypeInference.py | 3 +++ 1 file changed, 3 insertions(+) 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(): -- 2.26.2