PyAPI: minor clarification to error

This commit is contained in:
Campbell Barton
2025-08-12 13:31:24 +10:00
parent 5a22993253
commit 570eb9c60a

View File

@@ -628,8 +628,8 @@ static void pygpu_buffer_strides_calc(const eGPUDataFormat format,
/* Here is the buffer interface function */
static int pygpu_buffer__bf_getbuffer(BPyGPUBuffer *self, Py_buffer *view, int flags)
{
if (view == nullptr) {
PyErr_SetString(PyExc_ValueError, "nullptr view in getbuffer");
if (UNLIKELY(view == nullptr)) {
PyErr_SetString(PyExc_ValueError, "null view in getbuffer is obsolete");
return -1;
}