mirror of
https://github.com/wassname/ray.git
synced 2026-08-05 13:21:03 +08:00
fix mac build
This commit is contained in:
+5
-1
@@ -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/")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user