summaryrefslogtreecommitdiffstats
path: root/Modules/cStringIO.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
commit593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch)
treec0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Modules/cStringIO.c
parentc3cb683d638e9d660c18a05293a576f98965166e (diff)
downloadcpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r--Modules/cStringIO.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 139a4a8..576a176 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -119,7 +119,7 @@ PyDoc_STRVAR(IO_getval__doc__,
static PyObject *
IO_cgetval(PyObject *self) {
if (!IO__opencheck(IOOOBJECT(self))) return NULL;
- return PyString_FromStringAndSize(((IOobject*)self)->buf,
+ return PyBytes_FromStringAndSize(((IOobject*)self)->buf,
((IOobject*)self)->pos);
}
@@ -137,7 +137,7 @@ IO_getval(IOobject *self, PyObject *args) {
}
else
s=self->string_size;
- return PyString_FromStringAndSize(self->buf, s);
+ return PyBytes_FromStringAndSize(self->buf, s);
}
PyDoc_STRVAR(IO_isatty__doc__, "isatty(): always returns 0");
@@ -177,7 +177,7 @@ IO_read(IOobject *self, PyObject *args) {
if ( (n=IO_cread((PyObject*)self,&output,n)) < 0) return NULL;
- return PyString_FromStringAndSize(output, n);
+ return PyBytes_FromStringAndSize(output, n);
}
PyDoc_STRVAR(IO_readline__doc__, "readline() -- Read one line");
@@ -215,7 +215,7 @@ IO_readline(IOobject *self, PyObject *args) {
n -= m;
self->pos -= m;
}
- return PyString_FromStringAndSize(output, n);
+ return PyBytes_FromStringAndSize(output, n);
}
PyDoc_STRVAR(IO_readlines__doc__, "readlines() -- Read all lines");
@@ -238,7 +238,7 @@ IO_readlines(IOobject *self, PyObject *args) {
goto err;
if (n == 0)
break;
- line = PyString_FromStringAndSize (output, n);
+ line = PyBytes_FromStringAndSize (output, n);
if (!line)
goto err;
if (PyList_Append (result, line) == -1) {
@@ -315,7 +315,7 @@ IO_iternext(Iobject *self)
next = IO_readline((IOobject *)self, NULL);
if (!next)
return NULL;
- if (!PyString_GET_SIZE(next)) {
+ if (!PyBytes_GET_SIZE(next)) {
Py_DECREF(next);
PyErr_SetNone(PyExc_StopIteration);
return NULL;
@@ -456,7 +456,7 @@ O_writelines(Oobject *self, PyObject *args) {
while ((s = PyIter_Next(it)) != NULL) {
Py_ssize_t n;
char *c;
- if (PyString_AsStringAndSize(s, &c, &n) == -1) {
+ if (PyBytes_AsStringAndSize(s, &c, &n) == -1) {
Py_DECREF(it);
Py_DECREF(s);
return NULL;