diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index f76aba6b18054b9533945f735289b989e1240360..d1948cc8c6307fad77903d790624d4cd3625536a 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -2348,8 +2348,8 @@ namespace pyopencl py::object py_buffer_origin, py::object py_host_origin, py::object py_region, - py::sequence py_buffer_pitches, - py::sequence py_host_pitches, + py::object py_buffer_pitches, + py::object py_host_pitches, py::object py_wait_for, bool is_blocking ) diff --git a/src/wrap_cl_part_1.cpp b/src/wrap_cl_part_1.cpp index 01a62ab30cd5e230a3c5c9e44c938b47791b5c60..a87158f95344ba3e0c1edcffbffc98966bf22c81 100644 --- a/src/wrap_cl_part_1.cpp +++ b/src/wrap_cl_part_1.cpp @@ -309,8 +309,8 @@ void pyopencl_expose_part_1(py::module &m) py::arg("buffer_origin"), py::arg("host_origin"), py::arg("region"), - py::arg("buffer_pitches")=py::tuple(), - py::arg("host_pitches")=py::tuple(), + py::arg("buffer_pitches")=py::none(), + py::arg("host_pitches")=py::none(), py::arg("wait_for")=py::none(), py::arg("is_blocking")=true ); @@ -321,8 +321,8 @@ void pyopencl_expose_part_1(py::module &m) py::arg("buffer_origin"), py::arg("host_origin"), py::arg("region"), - py::arg("buffer_pitches")=py::tuple(), - py::arg("host_pitches")=py::tuple(), + py::arg("buffer_pitches")=py::none(), + py::arg("host_pitches")=py::none(), py::arg("wait_for")=py::none(), py::arg("is_blocking")=true ); @@ -333,8 +333,8 @@ void pyopencl_expose_part_1(py::module &m) py::arg("src_origin"), py::arg("dst_origin"), py::arg("region"), - py::arg("src_pitches")=py::tuple(), - py::arg("dst_pitches")=py::tuple(), + py::arg("src_pitches")=py::none(), + py::arg("dst_pitches")=py::none(), py::arg("wait_for")=py::none() ); #endif diff --git a/src/wrap_helpers.hpp b/src/wrap_helpers.hpp index 651274e021791af6db2fe6bcb78fcbdcef8c84b7..bf6853ea919509b679f799d7937c109bffbba8ad 100644 --- a/src/wrap_helpers.hpp +++ b/src/wrap_helpers.hpp @@ -86,7 +86,7 @@ namespace py = pybind11; size_t NAME[2] = {0, 0}; \ if (py_##NAME.ptr() != Py_None) \ { \ - py::tuple py_tup_##NAME = py_##NAME; \ + py::tuple py_tup_##NAME = py::cast(py_##NAME); \ size_t my_len = len(py_tup_##NAME); \ if (my_len > 2) \ throw error("transfer", CL_INVALID_VALUE, #NAME "has too many components"); \