diff options
author | Jeroen Demeyer <J.Demeyer@UGent.be> | 2019-07-11 08:59:05 (GMT) |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-07-11 08:59:05 (GMT) |
commit | 59ad110d7a7784d53d0b502eebce0346597a6bef (patch) | |
tree | 8ccd39e358017efe2abe41912c2f9d567ee9f248 /Python/sysmodule.c | |
parent | 2a3d4d9c53dd4831c3ecf56bc7c4a289c33030d6 (diff) | |
download | cpython-59ad110d7a7784d53d0b502eebce0346597a6bef.zip cpython-59ad110d7a7784d53d0b502eebce0346597a6bef.tar.gz cpython-59ad110d7a7784d53d0b502eebce0346597a6bef.tar.bz2 |
bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index dc198a5..103a111 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -581,7 +581,7 @@ sys_displayhook_unencodable(PyThreadState *tstate, PyObject *outf, PyObject *o) buffer = _PyObject_GetAttrId(outf, &PyId_buffer); if (buffer) { - result = _PyObject_CallMethodIdObjArgs(buffer, &PyId_write, encoded, NULL); + result = _PyObject_CallMethodIdOneArg(buffer, &PyId_write, encoded); Py_DECREF(buffer); Py_DECREF(encoded); if (result == NULL) @@ -3114,9 +3114,7 @@ sys_pyfile_write_unicode(PyObject *unicode, PyObject *file) if (file == NULL) return -1; assert(unicode != NULL); - PyObject *margs[2] = {file, unicode}; - PyObject *result = _PyObject_VectorcallMethodId(&PyId_write, margs, - 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); + PyObject *result = _PyObject_CallMethodIdOneArg(file, &PyId_write, unicode); if (result == NULL) { return -1; } |