diff Modules/cStringIO.c @ 30683:3b59fa5d25b1 legacy-trunk

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)
author Raymond Hettinger <python@rcn.com>
date Sun, 12 Oct 2003 19:09:37 +0000
parents 6842ceb39a14
children 706d6d11ee36
line wrap: on
line diff
--- a/Modules/cStringIO.c	Sun Oct 12 18:24:34 2003 +0000
+++ b/Modules/cStringIO.c	Sun Oct 12 19:09:37 2003 +0000
@@ -439,7 +439,7 @@
         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;