Skip to content

Commit

Permalink
Compare PyBuffer_IsContiguous to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jul 31, 2024
1 parent 2a659b9 commit 6f3d60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pybind11/cucim_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ py::object py_read_region(const CuImage& cuimg,
{
throw std::invalid_argument("Expected int64 array-like");
}
if (!PyBuffer_IsContiguous(buf.view(), 'C'))
if (PyBuffer_IsContiguous(buf.view(), 'C') == 0)
{
throw std::invalid_argument("Expected C-contiguous array-like");
}
Expand Down

0 comments on commit 6f3d60c

Please sign in to comment.