From 1b84188330aa07c5ca5babbc0305746ad577b2a9 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Mon, 7 Feb 2022 15:29:25 -0500 Subject: [PATCH] Minor change to improve readability (#3695) --- include/pybind11/detail/class.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/detail/class.h b/include/pybind11/detail/class.h index cc1e40ce7..dd8c60bac 100644 --- a/include/pybind11/detail/class.h +++ b/include/pybind11/detail/class.h @@ -568,8 +568,8 @@ extern "C" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int fla view->format = const_cast(info->format.c_str()); if ((flags & PyBUF_STRIDES) == PyBUF_STRIDES) { view->ndim = (int) info->ndim; - view->strides = &info->strides[0]; - view->shape = &info->shape[0]; + view->strides = info->strides.data(); + view->shape = info->shape.data(); } Py_INCREF(view->obj); return 0;