mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Renamed PyString to PyBytes
This commit is contained in:
parent
c3cb683d63
commit
593daf545b
176 changed files with 2793 additions and 2791 deletions
|
|
@ -162,17 +162,17 @@ lad_read(lad_t *self, PyObject *args)
|
|||
|
||||
if (!PyArg_ParseTuple(args, "i:read", &size))
|
||||
return NULL;
|
||||
rv = PyString_FromStringAndSize(NULL, size);
|
||||
rv = PyBytes_FromStringAndSize(NULL, size);
|
||||
if (rv == NULL)
|
||||
return NULL;
|
||||
cp = PyString_AS_STRING(rv);
|
||||
cp = PyBytes_AS_STRING(rv);
|
||||
if ((count = read(self->x_fd, cp, size)) < 0) {
|
||||
PyErr_SetFromErrno(LinuxAudioError);
|
||||
Py_DECREF(rv);
|
||||
return NULL;
|
||||
}
|
||||
self->x_icount += count;
|
||||
_PyString_Resize(&rv, count);
|
||||
_PyBytes_Resize(&rv, count);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue