diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-12-09 15:22:32 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-12-09 15:22:32 (GMT) |
commit | 5abaa2b139fb75a76933fb5437e09021fd080fae (patch) | |
tree | 6c58da8c7648f939bcb5b8e50755cf9013d8e00f /Objects/descrobject.c | |
parent | 55ba38a48097e4b21b406cc617df1481727f5c25 (diff) | |
download | cpython-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/descrobject.c')
-rw-r--r-- | Objects/descrobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index ee356b1..090c9cd 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -1454,7 +1454,7 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del) doc = pold->prop_doc ? pold->prop_doc : Py_None; } - new = PyObject_CallFunction(type, "OOOO", get, set, del, doc); + new = PyObject_CallFunctionObjArgs(type, get, set, del, doc, NULL); Py_DECREF(type); if (new == NULL) return NULL; |