[Python-checkins] cpython: Close #10616: mention bytes and bytearray in PyObject_AsCharBuffer() error
victor.stinner
python-checkins at python.org
Mon May 30 23:21:37 CEST 2011
http://hg.python.org/cpython/rev/7ed75bb4f37c
changeset: 70531:7ed75bb4f37c
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon May 30 23:21:30 2011 +0200
summary:
Close #10616: mention bytes and bytearray in PyObject_AsCharBuffer() error
message
files:
Objects/abstract.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Objects/abstract.c b/Objects/abstract.c
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -237,7 +237,8 @@
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;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list