diff options
author | Raymond Hettinger <python@rcn.com> | 2004-02-27 10:30:49 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-02-27 10:30:49 +0000 |
commit | 27601915bc89d31b4cc0dec6157ffd2350d759c5 (patch) | |
tree | 6a107a2afbbeb28afac76891ff27262afcf20f46 /Modules/cStringIO.c | |
parent | eaba1cabae75cf32512f28277bc4adb79852c582 (diff) | |
download | cpython-27601915bc89d31b4cc0dec6157ffd2350d759c5.tar.gz |
Speed-up the joiner call by avoiding Py_BuildValue().
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r-- | Modules/cStringIO.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index ee11878730..4ec5e88c88 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); |