summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-25 19:15:31 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-25 19:15:31 (GMT)
commit684fd0c8ec0bad54d3ff39ae15873f80e119478b (patch)
tree56596aed7bfd401ebe049e566201f75f88150b27 /Objects/classobject.c
parent3b0cae9cc06374eb7a7159f1328ec700208d6109 (diff)
downloadcpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.zip
cpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.tar.gz
cpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.tar.bz2
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index a1907f5..a89366b 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -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;