diff options
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 51c7755..44e4929 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -703,7 +703,6 @@ r_string(Py_ssize_t n, RFILE *p) read = fread(p->buf, 1, n, p->fp); } else { - _Py_IDENTIFIER(readinto); PyObject *res, *mview; Py_buffer buf; @@ -713,7 +712,7 @@ r_string(Py_ssize_t n, RFILE *p) if (mview == NULL) return NULL; - res = _PyObject_CallMethodId(p->readable, &PyId_readinto, "N", mview); + res = _PyObject_CallMethod(p->readable, &_Py_ID(readinto), "N", mview); if (res != NULL) { read = PyNumber_AsSsize_t(res, PyExc_ValueError); Py_DECREF(res); @@ -1713,12 +1712,11 @@ marshal_dump_impl(PyObject *module, PyObject *value, PyObject *file, /* XXX Quick hack -- need to do this differently */ PyObject *s; PyObject *res; - _Py_IDENTIFIER(write); s = PyMarshal_WriteObjectToString(value, version); if (s == NULL) return NULL; - res = _PyObject_CallMethodIdOneArg(file, &PyId_write, s); + res = _PyObject_CallMethodOneArg(file, &_Py_ID(write), s); Py_DECREF(s); return res; } @@ -1745,7 +1743,6 @@ marshal_load(PyObject *module, PyObject *file) /*[clinic end generated code: output=f8e5c33233566344 input=c85c2b594cd8124a]*/ { PyObject *data, *result; - _Py_IDENTIFIER(read); RFILE rf; /* @@ -1755,7 +1752,7 @@ marshal_load(PyObject *module, PyObject *file) * This can be removed if we guarantee good error handling * for r_string() */ - data = _PyObject_CallMethodId(file, &PyId_read, "i", 0); + data = _PyObject_CallMethod(file, &_Py_ID(read), "i", 0); if (data == NULL) return NULL; if (!PyBytes_Check(data)) { |