summaryrefslogtreecommitdiffstats
path: root/Modules/cStringIO.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-24 19:53:54 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-24 19:53:54 (GMT)
commit2a502d8304cdb92109a35ad32a3bfa4fe246d84f (patch)
tree826d79fe4d6ecd33bab1251bfba0f04f4a7f6bcb /Modules/cStringIO.c
parentd540509682717e1a10baec2d7c678fe89b146732 (diff)
downloadcpython-2a502d8304cdb92109a35ad32a3bfa4fe246d84f.zip
cpython-2a502d8304cdb92109a35ad32a3bfa4fe246d84f.tar.gz
cpython-2a502d8304cdb92109a35ad32a3bfa4fe246d84f.tar.bz2
Use 'S' format character for the optional constructor argument, so we
get a decent error message when it's not a string (instead of confusing errors when trying to use the thing).
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r--Modules/cStringIO.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index 2d7c940..494d895 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -565,7 +565,7 @@ static PyObject *
IO_StringIO(PyObject *self, PyObject *args) {
PyObject *s=0;
- UNLESS(PyArg_ParseTuple(args, "|O", &s)) return NULL;
+ UNLESS(PyArg_ParseTuple(args, "|S", &s)) return NULL;
if(s) return newIobject(s);
return newOobject(128);
}