summaryrefslogtreecommitdiff
path: root/Modules/cdmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 +0000
commitdd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch)
treeb2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /Modules/cdmodule.c
parente98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff)
downloadcpython-git-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz
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.
Diffstat (limited to 'Modules/cdmodule.c')
-rw-r--r--Modules/cdmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c
index 8602d5dfb4..f09b0a4adf 100644
--- a/Modules/cdmodule.c
+++ b/Modules/cdmodule.c
@@ -239,19 +239,19 @@ CD_readda(cdplayerobject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "i:readda", &numframes))
return NULL;
- result = PyBytes_FromStringAndSize(NULL, numframes * sizeof(CDFRAME));
+ result = PyString_FromStringAndSize(NULL, numframes * sizeof(CDFRAME));
if (result == NULL)
return NULL;
n = CDreadda(self->ob_cdplayer,
- (CDFRAME *) PyBytes_AsString(result), numframes);
+ (CDFRAME *) PyString_AsString(result), numframes);
if (n == -1) {
Py_DECREF(result);
PyErr_SetFromErrno(CdError);
return NULL;
}
if (n < numframes)
- _PyBytes_Resize(&result, n * sizeof(CDFRAME));
+ _PyString_Resize(&result, n * sizeof(CDFRAME));
return result;
}
@@ -468,7 +468,7 @@ CD_callback(void *arg, CDDATATYPES type, void *data)
PyTuple_SetItem(args, 1, PyInt_FromLong((long) type));
switch (type) {
case cd_audio:
- v = PyBytes_FromStringAndSize(data, CDDA_DATASIZE);
+ v = PyString_FromStringAndSize(data, CDDA_DATASIZE);
break;
case cd_pnum:
case cd_index:
@@ -484,15 +484,15 @@ CD_callback(void *arg, CDDATATYPES type, void *data)
#undef ptr
break;
case cd_catalog:
- v = PyBytes_FromStringAndSize(NULL, 13);
- p = PyBytes_AsString(v);
+ v = PyString_FromStringAndSize(NULL, 13);
+ p = PyString_AsString(v);
for (i = 0; i < 13; i++)
*p++ = ((char *) data)[i] + '0';
break;
case cd_ident:
#define ptr ((struct cdident *) data)
- v = PyBytes_FromStringAndSize(NULL, 12);
- p = PyBytes_AsString(v);
+ v = PyString_FromStringAndSize(NULL, 12);
+ p = PyString_AsString(v);
CDsbtoa(p, ptr->country, 2);
p += 2;
CDsbtoa(p, ptr->owner, 3);