cpython: 7cd479573de9 (original) (raw)
Mercurial > cpython
changeset 102758:7cd479573de9
call_function_tail() uses fast call Issue #27128: Modify call_function_tail() to use _PyObject_FastCall() when args is not a tuple to avoid the creation of a temporary tuple. call_function_tail() is used by: * PyObject_CallFunction() * PyObject_CallMethod() * _PyObject_CallMethodId() [#27128]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Fri, 19 Aug 2016 16:44:19 +0200 |
parents | 89e4ad001f3d |
children | 34af2edface9 |
files | Objects/abstract.c |
diffstat | 1 files changed, 6 insertions(+), 13 deletions(-)[+] [-] Objects/abstract.c 19 |
line wrap: on
line diff
--- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2272,27 +2272,20 @@ exit: static PyObject* call_function_tail(PyObject *callable, PyObject *args) {
if (args == NULL) return NULL; if (!PyTuple_Check(args)) {
PyObject *a;[](#l1.14)
a = PyTuple_New(1);[](#l1.16)
if (a == NULL) {[](#l1.17)
Py_DECREF(args);[](#l1.18)
return NULL;[](#l1.19)
}[](#l1.20)
PyTuple_SET_ITEM(a, 0, args);[](#l1.21)
args = a;[](#l1.22)