summaryrefslogtreecommitdiffstats
path: root/Modules/_io/_iomodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-14 13:35:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-10-14 13:35:36 (GMT)
commit767046aab14de287a5bdbf2af61c994c4e8ffa2a (patch)
treec2da741ed896257a3d1ad252a16cafc33350c2fb /Modules/_io/_iomodule.c
parent7903913fa6a2904159cc1658f3471d2d2edde112 (diff)
downloadcpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.zip
cpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.tar.gz
cpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.tar.bz2
Replace {Get,Set,Has}AttrString with *AttrId.
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r--Modules/_io/_iomodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index a8d3ed4..6e8d374 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;