[Python-checkins] r55542 - python/branches/cpy_merge/Modules/cStringIO.c
alexandre.vassalotti
python-checkins at python.org
Thu May 24 02:20:50 CEST 2007
Author: alexandre.vassalotti
Date: Thu May 24 02:20:45 2007
New Revision: 55542
Modified:
python/branches/cpy_merge/Modules/cStringIO.c
Log:
Fix a small build error due to the docstring move. (oops)
Modified: python/branches/cpy_merge/Modules/cStringIO.c
==============================================================================
--- python/branches/cpy_merge/Modules/cStringIO.c (original)
+++ python/branches/cpy_merge/Modules/cStringIO.c Thu May 24 02:20:45 2007
@@ -124,24 +124,9 @@
static PyObject *
IO_getval(IOobject *self, PyObject *args)
{
- PyObject *use_pos = Py_None;
- Py_ssize_t s;
-
if (!IO__opencheck(self))
return NULL;
- if (!PyArg_UnpackTuple(args, "getval", 0, 1, &use_pos))
- return NULL;
-
- if (PyObject_IsTrue(use_pos)) {
- s = self->pos;
- if (s > self->string_size)
- s = self->string_size;
- }
- else {
- s = self->string_size;
- }
-
- return PyString_FromStringAndSize(self->buf, s);
+ return PyString_FromStringAndSize(self->buf, self->string_size);
}
static PyObject *
@@ -550,6 +535,9 @@
PyObject_Del(self);
}
+
+PyDoc_STRVAR(Otype__doc__, "Simple type for output to strings.");
+
static PyTypeObject Otype = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size */
@@ -585,8 +573,6 @@
file_getsetlist, /*tp_getset */
};
-PyDoc_STRVAR(Otype__doc__, "Simple type for output to strings.");
-
static PyObject *
newOobject(int size)
{
@@ -679,6 +665,9 @@
PyObject_Del(self);
}
+PyDoc_STRVAR(Itype__doc__,
+ "Simple type for treating strings as input file streams");
+
static PyTypeObject Itype = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size */
@@ -714,9 +703,6 @@
file_getsetlist, /* tp_getset */
};
-PyDoc_STRVAR(Itype__doc__,
- "Simple type for treating strings as input file streams");
-
static PyObject *
newIobject(PyObject *s)
{
More information about the Python-checkins
mailing list