From 6f3d60c83668698ccf71ac0c8a853966536b104e Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 31 Jul 2024 04:53:26 -0700 Subject: [PATCH] Compare `PyBuffer_IsContiguous` to `0` --- python/pybind11/cucim_py.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pybind11/cucim_py.cpp b/python/pybind11/cucim_py.cpp index c973bf26..bb91b5c4 100644 --- a/python/pybind11/cucim_py.cpp +++ b/python/pybind11/cucim_py.cpp @@ -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"); }