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) --- Python/exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/exceptions.c') diff --git a/Python/exceptions.c b/Python/exceptions.c index d489aa6efb..4642046125 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -1821,7 +1821,7 @@ _PyExc_Init(void) } /* Now we need to pre-allocate a MemoryError instance */ - args = Py_BuildValue("()"); + args = PyTuple_New(0); if (!args || !(PyExc_MemoryErrorInst = PyEval_CallObject(PyExc_MemoryError, args))) { -- cgit v1.2.1