diff options
| author | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-06 21:34:51 +0000 |
|---|---|---|
| committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-06 21:34:51 +0000 |
| commit | 0a608fdaac5b4422b9ade6ec7b44182902f2f9ce (patch) | |
| tree | 80f50c009d21accfd42b8a736ce9761370169995 /Modules/ossaudiodev.c | |
| parent | 7e958d1ceb0b92fa7bace7040ce042474d3ea510 (diff) | |
| download | cpython-git-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.tar.gz | |
fixes deferred/release blocker issue #3797: Fixed the dbm, marshal, mmap,
ossaudiodev, & winreg modules to return bytes objects instead of bytearray
objects.
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 5828c3f56d..677f9ac0c7 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; } |
