fix mac build

This commit is contained in:
Philipp Moritz
2016-07-23 18:59:19 -07:00
parent c973059944
commit 0a26135821
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -8,6 +8,10 @@ find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(NumPy REQUIRED)
if(APPLE)
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif(APPLE)
include_directories("${PYTHON_INCLUDE_DIRS}")
include_directories("${NUMPY_INCLUDE_DIR}")
@@ -20,7 +24,7 @@ endif()
set(ARROW_DIR "${CMAKE_SOURCE_DIR}/../arrow/" CACHE STRING
"Path of the arrow source directory")
set(ARROW_STATIC_LIB "${CMAKE_SOURCE_DIR}/../arrow/cpp/build/release/libarrow.so" CACHE STRING
set(ARROW_STATIC_LIB "${CMAKE_SOURCE_DIR}/../arrow/cpp/build/release/libarrow.a" CACHE STRING
"Path to libarrow.a (needs to be changed if arrow is build in debug mode)")
include_directories("${ARROW_DIR}/cpp/src/")
+2 -2
View File
@@ -61,7 +61,7 @@ Status append(PyObject* elem, SequenceBuilder& builder,
return Status::NotImplemented("long overflow");
}
} else if (PyInt_Check(elem)) {
RETURN_NOT_OK(builder.Append(PyInt_AS_LONG(elem)));
RETURN_NOT_OK(builder.Append(static_cast<int64_t>(PyInt_AS_LONG(elem))));
} else if (PyString_Check(elem)) {
RETURN_NOT_OK(builder.Append(PyString_AS_STRING(elem), PyString_GET_SIZE(elem)));
} else if (PyList_Check(elem)) {
@@ -95,7 +95,7 @@ Status SerializeSequences(std::vector<PyObject*> sequences, std::shared_ptr<Arra
for (const auto& sequence : sequences) {
PyObject* item;
PyObject* iterator = PyObject_GetIter(sequence);
while (item = PyIter_Next(iterator)) {
while ((item = PyIter_Next(iterator))) {
Status s = append(item, builder, sublists, subtuples, subdicts);
Py_DECREF(item);
// if an error occurs, we need to decrement the reference counts before returning