diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 13:35:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-14 13:35:36 (GMT) |
commit | 767046aab14de287a5bdbf2af61c994c4e8ffa2a (patch) | |
tree | c2da741ed896257a3d1ad252a16cafc33350c2fb /Modules/_io/fileio.c | |
parent | 7903913fa6a2904159cc1658f3471d2d2edde112 (diff) | |
download | cpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.zip cpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.tar.gz cpython-767046aab14de287a5bdbf2af61c994c4e8ffa2a.tar.bz2 |
Replace {Get,Set,Has}AttrString with *AttrId.
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r-- | Modules/_io/fileio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index e3c0dd9..7364523 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -993,12 +993,13 @@ mode_string(fileio *self) static PyObject * fileio_repr(fileio *self) { + _Py_IDENTIFIER(name); PyObject *nameobj, *res; if (self->fd < 0) return PyUnicode_FromFormat("<_io.FileIO [closed]>"); - nameobj = PyObject_GetAttrString((PyObject *) self, "name"); + nameobj = _PyObject_GetAttrId((PyObject *) self, &PyId_name); if (nameobj == NULL) { if (PyErr_ExceptionMatches(PyExc_AttributeError)) PyErr_Clear(); |