Commit a13daff3 authored by Georg Brandl's avatar Georg Brandl

Slightly improve buffer-related error message.

parent b7af5046
...@@ -331,7 +331,7 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags) ...@@ -331,7 +331,7 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags)
{ {
if (!PyObject_CheckBuffer(obj)) { if (!PyObject_CheckBuffer(obj)) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"'%100s' does not have the buffer interface", "'%100s' does not support the buffer interface",
Py_TYPE(obj)->tp_name); Py_TYPE(obj)->tp_name);
return -1; return -1;
} }
......
...@@ -255,7 +255,7 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char fort) ...@@ -255,7 +255,7 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char fort)
if (!PyObject_CheckBuffer(obj)) { if (!PyObject_CheckBuffer(obj)) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"object does not have the buffer interface"); "object does not support the buffer interface");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment