Serialize Python floats properly as doubles. (#14)

This commit is contained in:
Robert Nishihara
2016-09-15 15:11:51 -07:00
committed by Philipp Moritz
parent 5ac2df4329
commit d469366c75
+1 -1
View File
@@ -64,7 +64,7 @@ Status append(PyObject* elem, SequenceBuilder& builder,
if (PyBool_Check(elem)) {
RETURN_NOT_OK(builder.AppendBool(elem == Py_True));
} else if (PyFloat_Check(elem)) {
RETURN_NOT_OK(builder.AppendFloat(PyFloat_AS_DOUBLE(elem)));
RETURN_NOT_OK(builder.AppendDouble(PyFloat_AS_DOUBLE(elem)));
} else if (PyLong_Check(elem)) {
int overflow = 0;
int64_t data = PyLong_AsLongLongAndOverflow(elem, &overflow);