Commit 63e40411 authored by Guido van Rossum's avatar Guido van Rossum

Fix error messages for buffer objects to say "bytes" instead of "string".

parent f6b716d3
......@@ -1267,12 +1267,12 @@ convertbuffer(PyObject *arg, void **p, char **errmsg)
*p = NULL;
if (pb == NULL ||
pb->bf_getbuffer == NULL) {
*errmsg = "string or read-only buffer";
*errmsg = "bytes or read-only buffer";
return -1;
}
if ((*pb->bf_getbuffer)(arg, &view, PyBUF_SIMPLE) != 0) {
*errmsg = "string or single-segment read-only buffer";
*errmsg = "bytes or single-segment read-only buffer";
return -1;
}
count = view.len;
......
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