Mercurial > cpython-lru_cache-weakref
diff Objects/classobject.c @ 26818:e094a03a80ff legacy-trunk
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.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Sun, 29 Dec 2002 16:33:45 +0000 |
| parents | 19507a1d0254 |
| children | bf083e35185f |
line wrap: on
line diff
--- a/Objects/classobject.c Sun Dec 29 05:49:09 2002 +0000 +++ b/Objects/classobject.c Sun Dec 29 16:33:45 2002 +0000 @@ -2178,7 +2178,7 @@ PyObject *self; PyObject *classObj; - if (!PyArg_ParseTuple(args, "OOO:instancemethod", + if (!PyArg_UnpackTuple(args, "instancemethod", 3, 3, &func, &self, &classObj)) return NULL; if (!PyCallable_Check(func)) {
