mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
python: fixed limited API build
This commit is contained in:
parent
0dc28d3446
commit
89ed813585
@ -7,6 +7,7 @@ if(PYTHON3_LIMITED_API
|
|||||||
AND NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.15"
|
AND NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.15"
|
||||||
AND PYTHON3_NUMPY_VERSION VERSION_LESS "1.17"
|
AND PYTHON3_NUMPY_VERSION VERSION_LESS "1.17"
|
||||||
)
|
)
|
||||||
|
message(WARNING "Current NUMPY version (${PYTHON3_NUMPY_VERSION}) is not compatible with LIMITED_API.")
|
||||||
set(PYTHON3_LIMITED_API OFF)
|
set(PYTHON3_LIMITED_API OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1499,7 +1499,7 @@ convert_to_python_tuple(const std::tuple<Tp...>& cpp_tuple, PyObject* py_tuple)
|
|||||||
if (!item)
|
if (!item)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PyTuple_SET_ITEM(py_tuple, I, item);
|
PyTuple_SetItem(py_tuple, I, item);
|
||||||
convert_to_python_tuple<I + 1, Tp...>(cpp_tuple, py_tuple);
|
convert_to_python_tuple<I + 1, Tp...>(cpp_tuple, py_tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user