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/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 018400cb92..21c2cace81 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1037,7 +1037,7 @@ PyErr_PrintEx(int set_sys_last_vars) } hook = PySys_GetObject("excepthook"); if (hook) { - PyObject *args = Py_BuildValue("(OOO)", + PyObject *args = PyTuple_Pack(3, exception, v ? v : Py_None, tb ? tb : Py_None); PyObject *result = PyEval_CallObject(hook, args); if (result == NULL) { -- cgit v1.2.1