Author: Armin Rigo <ar...@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;
 }
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to