summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-09 15:22:32 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-09 15:22:32 (GMT)
commit5abaa2b139fb75a76933fb5437e09021fd080fae (patch)
tree6c58da8c7648f939bcb5b8e50755cf9013d8e00f /Objects/abstract.c
parent55ba38a48097e4b21b406cc617df1481727f5c25 (diff)
downloadcpython-5abaa2b139fb75a76933fb5437e09021fd080fae.zip
cpython-5abaa2b139fb75a76933fb5437e09021fd080fae.tar.gz
cpython-5abaa2b139fb75a76933fb5437e09021fd080fae.tar.bz2
Use PyObject_CallFunctionObjArgs()
Issue #28915: Replace PyObject_CallFunction() with PyObject_CallFunctionObjArgs() when the format string was only made of "O" formats, PyObject* arguments. PyObject_CallFunctionObjArgs() avoids the creation of a temporary tuple and doesn't have to parse a format string.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 2c5057d..d3b9ec0 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2549,7 +2549,7 @@ _PyObject_CallFunctionVa(PyObject *callable, const char *format,
}
if (nargs == 1 && PyTuple_Check(stack[0])) {
- /* Special cases:
+ /* Special cases for backward compatibility:
- PyObject_CallFunction(func, "O", tuple) calls func(*tuple)
- PyObject_CallFunction(func, "(OOO)", arg1, arg2, arg3) calls
func(*(arg1, arg2, arg3)): func(arg1, arg2, arg3) */