From 8ae468965700fd9900efc28bff8fa2015dae2bef Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 12 Oct 2003 19:09:37 +0000 Subject: 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) --- Modules/regexmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/regexmodule.c') diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index db541612e2..9f84032e4d 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -551,7 +551,7 @@ static PyObject *cache_prog; static int update_cache(PyObject *pat) { - PyObject *tuple = Py_BuildValue("(O)", pat); + PyObject *tuple = PyTuple_Pack(1, pat); int status = 0; if (!tuple) -- cgit v1.2.1