SF patch #659536: Use PyArg_UnpackTuple where possible.

Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
This commit is contained in:
Raymond Hettinger 2002-12-29 16:33:45 +00:00
parent f8bcfb13f1
commit ea3fdf44a2
11 changed files with 41 additions and 41 deletions

View file

@ -1654,7 +1654,7 @@ listsort(PyListObject *self, PyObject *args)
assert(self != NULL);
if (args != NULL) {
if (!PyArg_ParseTuple(args, "|O:sort", &compare))
if (!PyArg_UnpackTuple(args, "sort", 0, 1, &compare))
return NULL;
}
merge_init(&ms, compare);