Merge pull request #18422 from mshabunin:fix-python-limited

This commit is contained in:
Alexander Alekhin 2020-09-25 13:43:28 +00:00
commit 00c61cf197
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ if(PYTHON3_LIMITED_API
AND NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.15"
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)
endif()

View File

@ -1499,7 +1499,7 @@ convert_to_python_tuple(const std::tuple<Tp...>& cpp_tuple, PyObject* py_tuple)
if (!item)
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);
}