mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
This commit is contained in:
parent
3b0cae9cc0
commit
684fd0c8ec
8 changed files with 17 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue