mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Remove the buffer API from PyUnicode as specified by PEP 3137. Also,
fix the error message of the 't' format unit, in getargs.c, so that it asks for bytes, instead of string.
This commit is contained in:
parent
659e7f44e2
commit
70a237179f
4 changed files with 13 additions and 17 deletions
|
@ -1252,7 +1252,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
arg, msgbuf, bufsize);
|
||||
if (pb == NULL || pb->bf_getbuffer == NULL)
|
||||
return converterr(
|
||||
"string or read-only character buffer",
|
||||
"bytes or read-only character buffer",
|
||||
arg, msgbuf, bufsize);
|
||||
|
||||
if ((*pb->bf_getbuffer)(arg, &view, PyBUF_SIMPLE) != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue