diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 15:35:36 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 15:35:36 +0200 |
commit | d4b75b589c8ba33be7e6075b6556b44a70984195 (patch) | |
tree | 5fd68f5db0992fff0567181c6b5920807f0c74c1 /Modules/_io/_iomodule.c | |
parent | e6293a9daaf126e85412a3b4f3ec09b6816b4f28 (diff) | |
download | cpython-d4b75b589c8ba33be7e6075b6556b44a70984195.tar.gz |
Replace {Get,Set,Has}AttrString with *AttrId.
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r-- | Modules/_io/_iomodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index a8d3ed4354..6e8d374fcf 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -233,6 +233,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds) _Py_IDENTIFIER(isatty); _Py_IDENTIFIER(fileno); + _Py_IDENTIFIER(mode); if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|sizzziO:open", kwlist, &file, &mode, &buffering, @@ -440,7 +441,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds) if (wrapper == NULL) goto error; - if (PyObject_SetAttrString(wrapper, "mode", modeobj) < 0) + if (_PyObject_SetAttrId(wrapper, &PyId_mode, modeobj) < 0) goto error; Py_DECREF(modeobj); return wrapper; |