mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #3782: os.write() must not accept unicode strings
This commit is contained in:
parent
4e80cdd739
commit
9cadb1b6e0
9 changed files with 50 additions and 24 deletions
|
@ -4896,7 +4896,7 @@ posix_write(PyObject *self, PyObject *args)
|
|||
int fd;
|
||||
Py_ssize_t size;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "is*:write", &fd, &pbuf))
|
||||
if (!PyArg_ParseTuple(args, "iy*:write", &fd, &pbuf))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
size = write(fd, pbuf.buf, (size_t)pbuf.len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue