projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2b399c
)
fix type check condition in double cooercion
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 8 Dec 2009 09:45:06 +0000
(10:45 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 8 Dec 2009 09:45:06 +0000
(10:45 +0100)
Cython/Compiler/Optimize.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Optimize.py
b/Cython/Compiler/Optimize.py
index b8380ec22237ac00256e350b6e69b5ebd8443b29..c15985f902d3005647f7f1be4e512de40045ea75 100644
(file)
--- a/
Cython/Compiler/Optimize.py
+++ b/
Cython/Compiler/Optimize.py
@@
-1674,7
+1674,7
@@
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
PyObject* float_value;
if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
return PyFloat_AsDouble(obj);
- } else if (PyUnicode_CheckExact(obj) || Py
String
_CheckExact(obj)) {
+ } else if (PyUnicode_CheckExact(obj) || Py
Bytes
_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
float_value = PyFloat_FromString(obj);
#else