summaryrefslogtreecommitdiff
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-09 16:09:30 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-09 16:09:30 +0100
commit55ba38a48097e4b21b406cc617df1481727f5c25 (patch)
tree623f4fa4c83ecbdd1c0170399ca72741fbe0fb82 /Python/_warnings.c
parent61bdb0d31924ec5fd12aa8dbe197002c57dfbf82 (diff)
downloadcpython-git-55ba38a48097e4b21b406cc617df1481727f5c25.tar.gz
Use _PyObject_CallMethodIdObjArgs()
Issue #28915: Replace _PyObject_CallMethodId() with _PyObject_CallMethodIdObjArgs() in various modules when the format string was only made of "O" formats, PyObject* arguments. _PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and doesn't have to parse a format string.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 189bf70431..588fabb1f9 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -26,7 +26,7 @@ check_matched(PyObject *obj, PyObject *arg)
if (obj == Py_None)
return 1;
- result = _PyObject_CallMethodId(obj, &PyId_match, "O", arg);
+ result = _PyObject_CallMethodIdObjArgs(obj, &PyId_match, arg, NULL);
if (result == NULL)
return -1;