Close #10616: mention bytes and bytearray in PyObject_AsCharBuffer() error
message
This commit is contained in:
parent
2a12974bca
commit
f2a94216de
|
@ -237,7 +237,8 @@ PyObject_AsCharBuffer(PyObject *obj,
|
|||
pb = obj->ob_type->tp_as_buffer;
|
||||
if (pb == NULL || pb->bf_getbuffer == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"expected an object with the buffer interface");
|
||||
"expected bytes, bytearray "
|
||||
"or buffer compatible object");
|
||||
return -1;
|
||||
}
|
||||
if ((*pb->bf_getbuffer)(obj, &view, PyBUF_SIMPLE)) return -1;
|
||||
|
|
Loading…
Reference in New Issue