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

@ -4053,7 +4053,7 @@ build_class(PyObject *methods, PyObject *bases, PyObject *name)
metaclass = (PyObject *) &PyClass_Type;
Py_INCREF(metaclass);
}
result = PyObject_CallFunction(metaclass, "OOO", name, bases, methods);
result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, NULL);
Py_DECREF(metaclass);
if (result == NULL && PyErr_ExceptionMatches(PyExc_TypeError)) {
/* A type error here likely means that the user passed