diff options
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r-- | Modules/_io/_iomodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index 5c2f019..96426e0 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -400,7 +400,7 @@ _io_open_impl(PyObject *module, PyObject *file, const char *mode, /* buffering */ if (buffering < 0) { - PyObject *res = _PyObject_CallMethodId(raw, &PyId_isatty, NULL); + PyObject *res = _PyObject_CallMethodIdNoArgs(raw, &PyId_isatty); if (res == NULL) goto error; isatty = PyLong_AsLong(res); @@ -494,7 +494,7 @@ _io_open_impl(PyObject *module, PyObject *file, const char *mode, if (result != NULL) { PyObject *exc, *val, *tb, *close_result; PyErr_Fetch(&exc, &val, &tb); - close_result = _PyObject_CallMethodId(result, &PyId_close, NULL); + close_result = _PyObject_CallMethodIdNoArgs(result, &PyId_close); _PyErr_ChainExceptions(exc, val, tb); Py_XDECREF(close_result); Py_DECREF(result); |