diff options
Diffstat (limited to 'Modules/ossaudiodev.c')
-rw-r--r-- | Modules/ossaudiodev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 5828c3f..677f9ac 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -366,10 +366,10 @@ oss_read(oss_audio_t *self, PyObject *args) if (!PyArg_ParseTuple(args, "i:read", &size)) return NULL; - rv = PyByteArray_FromStringAndSize(NULL, size); + rv = PyBytes_FromStringAndSize(NULL, size); if (rv == NULL) return NULL; - cp = PyByteArray_AS_STRING(rv); + cp = PyBytes_AS_STRING(rv); Py_BEGIN_ALLOW_THREADS count = read(self->fd, cp, size); @@ -381,7 +381,7 @@ oss_read(oss_audio_t *self, PyObject *args) return NULL; } self->icount += count; - PyByteArray_Resize(rv, count); + _PyBytes_Resize(&rv, count); return rv; } |