mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Replace PyObject_CallFunction() with fastcall
Replace PyObject_CallFunction(func, "O", arg) and PyObject_CallFunction(func, "O", arg, NULL) with _PyObject_CallArg1(func, arg) Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func) _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack.
This commit is contained in:
parent
842cfff321
commit
4778eab1f2
8 changed files with 13 additions and 13 deletions
|
@ -538,7 +538,7 @@ deque_copy(PyObject *deque)
|
|||
return NULL;
|
||||
}
|
||||
if (old_deque->maxlen < 0)
|
||||
return PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "O", deque, NULL);
|
||||
return _PyObject_CallArg1((PyObject *)(Py_TYPE(deque)), deque);
|
||||
else
|
||||
return PyObject_CallFunction((PyObject *)(Py_TYPE(deque)), "Oi",
|
||||
deque, old_deque->maxlen, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue