]> granicus.if.org Git - python/commit
Replace PyObject_CallFunction() with fastcall
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 1 Dec 2016 13:51:04 +0000 (14:51 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 1 Dec 2016 13:51:04 +0000 (14:51 +0100)
commit4778eab1f2b70cd2431252cae987e4adb3729ce8
treeda490c7fb2cf97449a8f17ae3b053e49a7c9b8ac
parent842cfff3215aaebf788d782e40a61fe421fb2a5d
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.
Modules/_collectionsmodule.c
Modules/_elementtree.c
Modules/pyexpat.c
Modules/readline.c
Objects/genobject.c
Python/_warnings.c
Python/codecs.c
Python/marshal.c