Replace PyObject_CallFunction calls with only object args

with PyObject_CallFunctionObjArgs, which is 30% faster.
This commit is contained in:
Georg Brandl 2006-05-25 19:15:31 +00:00
parent 3b0cae9cc0
commit 684fd0c8ec
8 changed files with 17 additions and 20 deletions

View file

@ -81,12 +81,9 @@ PyClass_New(PyObject *bases, PyObject *dict, PyObject *name)
if (!PyClass_Check(base)) {
if (PyCallable_Check(
(PyObject *) base->ob_type))
return PyObject_CallFunction(
return PyObject_CallFunctionObjArgs(
(PyObject *) base->ob_type,
"OOO",
name,
bases,
dict);
name, bases, dict, NULL);
PyErr_SetString(PyExc_TypeError,
"PyClass_New: base must be a class");
return NULL;