Commits

Philip Jenvey committed 18ba4e7

issue1571: less confusing error msg

Comments (0)

Files changed (1)

pypy/module/_cffi_backend/ctypeptr.py

               (self.ctitem.is_primitive_integer and
                self.ctitem.size == rffi.sizeof(lltype.Char))):
             if not space.isinstance_w(w_ob, space.w_str):
-                raise self._convert_error("str or list or tuple", w_ob)
+                raise self._convert_error("bytes or list or tuple", w_ob)
             s = space.str_w(w_ob)
             n = len(s)
             if self.length >= 0 and n > self.length: