mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
This commit is contained in:
parent
38f44b4a4a
commit
762f93ff2e
37 changed files with 154 additions and 132 deletions
|
@ -430,7 +430,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
|
|||
if (fob == NULL) {
|
||||
PyErr_Clear();
|
||||
|
||||
res = _PyObject_CallMethodId(binary, &PyId_close, NULL);
|
||||
res = _PyObject_CallMethodIdNoArgs(binary, &PyId_close);
|
||||
Py_DECREF(binary);
|
||||
if (res)
|
||||
Py_DECREF(res);
|
||||
|
@ -450,7 +450,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
|
|||
break;
|
||||
}
|
||||
}
|
||||
res = _PyObject_CallMethodId(fob, &PyId_close, NULL);
|
||||
res = _PyObject_CallMethodIdNoArgs(fob, &PyId_close);
|
||||
if (res)
|
||||
Py_DECREF(res);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue