summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-07-08 10:19:25 +0200
committerInada Naoki <songofacandy@gmail.com>2019-07-08 17:19:25 +0900
commit762f93ff2efd6b7ef0177cad57939c0ab2002eac (patch)
tree4811b08fa9342c3b2575de7e7c1030d1d5eea8a0 /Python/pythonrun.c
parent38f44b4a4adc37e8f5f8971917d8b3145f351a56 (diff)
downloadcpython-git-762f93ff2efd6b7ef0177cad57939c0ab2002eac.tar.gz
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index f1d946a0b0..6089086078 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -978,7 +978,7 @@ _PyErr_Display(PyObject *file, PyObject *exception, PyObject *value, PyObject *t
Py_XDECREF(seen);
/* Call file.flush() */
- PyObject *res = _PyObject_CallMethodId(file, &PyId_flush, NULL);
+ PyObject *res = _PyObject_CallMethodIdNoArgs(file, &PyId_flush);
if (!res) {
/* Silently ignore file.flush() error */
PyErr_Clear();
@@ -1072,7 +1072,7 @@ flush_io(void)
f = _PySys_GetObjectId(&PyId_stderr);
if (f != NULL) {
- r = _PyObject_CallMethodId(f, &PyId_flush, NULL);
+ r = _PyObject_CallMethodIdNoArgs(f, &PyId_flush);
if (r)
Py_DECREF(r);
else
@@ -1080,7 +1080,7 @@ flush_io(void)
}
f = _PySys_GetObjectId(&PyId_stdout);
if (f != NULL) {
- r = _PyObject_CallMethodId(f, &PyId_flush, NULL);
+ r = _PyObject_CallMethodIdNoArgs(f, &PyId_flush);
if (r)
Py_DECREF(r);
else