Commit e6eca3b4 authored by Stefan Behnel's avatar Stefan Behnel

fix type check condition in double cooercion

parent f2b399ce
...@@ -1674,7 +1674,7 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj) { ...@@ -1674,7 +1674,7 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj) {
PyObject* float_value; PyObject* float_value;
if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) { if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
return PyFloat_AsDouble(obj); return PyFloat_AsDouble(obj);
} else if (PyUnicode_CheckExact(obj) || PyString_CheckExact(obj)) { } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
float_value = PyFloat_FromString(obj); float_value = PyFloat_FromString(obj);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment