projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c17037b
)
enable type inference in safe mode also for 'bint'
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 6 Dec 2009 22:30:46 +0000
(23:30 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 6 Dec 2009 22:30:46 +0000
(23:30 +0100)
Cython/Compiler/TypeInference.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/TypeInference.py
b/Cython/Compiler/TypeInference.py
index d2375ed81f6e6a1e9308cceff78585455eb421ce..c142453667de70e92da8ae7848e7be2d77d6d3fa 100644
(file)
--- 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():