diff options
Diffstat (limited to 'Modules/linuxaudiodev.c')
-rw-r--r-- | Modules/linuxaudiodev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c index 80077c6f1e8..bde6e4992df 100644 --- a/Modules/linuxaudiodev.c +++ b/Modules/linuxaudiodev.c @@ -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; } |