bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)

This commit is contained in:
Jeroen Demeyer 2019-07-11 10:59:05 +02:00 committed by Inada Naoki
parent 2a3d4d9c53
commit 59ad110d7a
23 changed files with 104 additions and 93 deletions

View file

@ -1507,7 +1507,7 @@ array_array_tofile(arrayobject *self, PyObject *f)
bytes = PyBytes_FromStringAndSize(ptr, size);
if (bytes == NULL)
return NULL;
res = _PyObject_CallMethodIdObjArgs(f, &PyId_write, bytes, NULL);
res = _PyObject_CallMethodIdOneArg(f, &PyId_write, bytes);
Py_DECREF(bytes);
if (res == NULL)
return NULL;