summaryrefslogtreecommitdiffstats
path: root/Modules/cStringIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r--Modules/cStringIO.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index ee11878..4ec5e88 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -436,7 +436,11 @@ O_writelines(Oobject *self, PyObject *args) {
if (PyObject_Size(args) < 0) return NULL;
- tmp = PyObject_CallFunction(joiner, "O", args);
+ args = PyTuple_Pack(1, args);
+ if (args == NULL)
+ return NULL;
+ tmp = PyObject_Call(joiner, args, NULL);
+ Py_DECREF(args);
UNLESS (tmp) return NULL;
args = PyTuple_Pack(1, tmp);