summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-28 17:57:00 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-07-28 17:57:00 (GMT)
commit1bba9db0c3602f5f4bb3d9417b89cfefb1678b1a (patch)
tree54f2d957239757be18e175e3032f0171fe0116af
parentc582bfca262ed1f1ded9c6088d9181b763474579 (diff)
downloadcpython-1bba9db0c3602f5f4bb3d9417b89cfefb1678b1a.zip
cpython-1bba9db0c3602f5f4bb3d9417b89cfefb1678b1a.tar.gz
cpython-1bba9db0c3602f5f4bb3d9417b89cfefb1678b1a.tar.bz2
Revert previous checkin.
-rw-r--r--Modules/cStringIO.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 4570605..16d4173 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -118,8 +118,8 @@ PyDoc_STRVAR(IO_getval__doc__,
static PyObject *
IO_cgetval(PyObject *self) {
if (!IO__opencheck(IOOOBJECT(self))) return NULL;
- return PyBytes_FromStringAndSize(((IOobject*)self)->buf,
- ((IOobject*)self)->pos);
+ return PyString_FromStringAndSize(((IOobject*)self)->buf,
+ ((IOobject*)self)->pos);
}
static PyObject *
@@ -136,7 +136,7 @@ IO_getval(IOobject *self, PyObject *args) {
}
else
s=self->string_size;
- return PyBytes_FromStringAndSize(self->buf, s);
+ return PyString_FromStringAndSize(self->buf, s);
}
PyDoc_STRVAR(IO_isatty__doc__, "isatty(): always returns 0");
@@ -176,7 +176,7 @@ IO_read(IOobject *self, PyObject *args) {
if ( (n=IO_cread((PyObject*)self,&output,n)) < 0) return NULL;
- return PyBytes_FromStringAndSize(output, n);
+ return PyString_FromStringAndSize(output, n);
}
PyDoc_STRVAR(IO_readline__doc__, "readline() -- Read one line");
@@ -214,7 +214,7 @@ IO_readline(IOobject *self, PyObject *args) {
n -= m;
self->pos -= m;
}
- return PyBytes_FromStringAndSize(output, n);
+ return PyString_FromStringAndSize(output, n);
}
PyDoc_STRVAR(IO_readlines__doc__, "readlines() -- Read all lines");
@@ -237,7 +237,7 @@ IO_readlines(IOobject *self, PyObject *args) {
goto err;
if (n == 0)
break;
- line = PyBytes_FromStringAndSize (output, n);
+ line = PyString_FromStringAndSize (output, n);
if (!line)
goto err;
if (PyList_Append (result, line) == -1) {
@@ -314,7 +314,7 @@ IO_iternext(Iobject *self)
next = IO_readline((IOobject *)self, NULL);
if (!next)
return NULL;
- if (!PyBytes_GET_SIZE(next)) {
+ if (!PyString_GET_SIZE(next)) {
Py_DECREF(next);
PyErr_SetNone(PyExc_StopIteration);
return NULL;