diff options
author | Raymond Hettinger <python@rcn.com> | 2003-10-12 19:09:37 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-10-12 19:09:37 +0000 |
commit | 8ae468965700fd9900efc28bff8fa2015dae2bef (patch) | |
tree | 1f3545b2d2a3ad8b7d5692a7f84daa88d850b29c /Modules/cStringIO.c | |
parent | cb2da43db8943e9e7b1d900bce1d6416339d6f64 (diff) | |
download | cpython-git-8ae468965700fd9900efc28bff8fa2015dae2bef.tar.gz |
Simplify and speedup uses of Py_BuildValue():
* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r-- | Modules/cStringIO.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index ac84ab0c51..ee11878730 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -439,7 +439,7 @@ O_writelines(Oobject *self, PyObject *args) { tmp = PyObject_CallFunction(joiner, "O", args); UNLESS (tmp) return NULL; - args = Py_BuildValue("(O)", tmp); + args = PyTuple_Pack(1, tmp); Py_DECREF(tmp); UNLESS (args) return NULL; |