[pypy-commit] cffi python3-port: Better error message.
arigo
noreply at buildbot.pypy.org
Sun Aug 12 19:49:50 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: python3-port
Changeset: r826:e90cff3ab174
Date: 2012-08-12 19:49 +0200
http://bitbucket.org/cffi/cffi/changeset/e90cff3ab174/
Log: Better error message.
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -765,8 +765,8 @@
return *(unsigned char *)((CDataObject *)init)->c_data;
}
PyErr_Format(PyExc_TypeError,
- "initializer for ctype 'char' must be a bytes string of length 1, "
- "not %.200s", Py_TYPE(init)->tp_name);
+ "initializer for ctype 'char' must be a "STR_OR_BYTES
+ " of length 1, not %.200s", Py_TYPE(init)->tp_name);
return -1;
}
More information about the pypy-commit
mailing list