mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
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.
This commit is contained in:
parent
61bdb0d319
commit
55ba38a480
6 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue