This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c
index bde6e49..80077c6 100644
--- a/Modules/linuxaudiodev.c
+++ b/Modules/linuxaudiodev.c
@@ -162,17 +162,17 @@
if (!PyArg_ParseTuple(args, "i:read", &size))
return NULL;
- rv = PyBytes_FromStringAndSize(NULL, size);
+ rv = PyString_FromStringAndSize(NULL, size);
if (rv == NULL)
return NULL;
- cp = PyBytes_AS_STRING(rv);
+ cp = PyString_AS_STRING(rv);
if ((count = read(self->x_fd, cp, size)) < 0) {
PyErr_SetFromErrno(LinuxAudioError);
Py_DECREF(rv);
return NULL;
}
self->x_icount += count;
- _PyBytes_Resize(&rv, count);
+ _PyString_Resize(&rv, count);
return rv;
}