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

@ -1653,7 +1653,7 @@ marshal_dump_impl(PyObject *module, PyObject *value, PyObject *file,
s = PyMarshal_WriteObjectToString(value, version);
if (s == NULL)
return NULL;
res = _PyObject_CallMethodIdObjArgs(file, &PyId_write, s, NULL);
res = _PyObject_CallMethodIdOneArg(file, &PyId_write, s);
Py_DECREF(s);
return res;
}