summaryrefslogtreecommitdiff
path: root/Modules/ossaudiodev.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-09-06 21:34:51 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-09-06 21:34:51 +0000
commit0a608fdaac5b4422b9ade6ec7b44182902f2f9ce (patch)
tree80f50c009d21accfd42b8a736ce9761370169995 /Modules/ossaudiodev.c
parent7e958d1ceb0b92fa7bace7040ce042474d3ea510 (diff)
downloadcpython-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.c6
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;
}