diff options
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 6a8fe6d140..45ab70ee69 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -843,9 +843,9 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f) { int rv = 1; PyObject *readmethod = NULL; + _Py_identifier(read); - - readmethod = PyObject_GetAttrString(f, "read"); + readmethod = _PyObject_GetAttrId(f, &PyId_read); if (readmethod == NULL) { PyErr_SetString(PyExc_TypeError, "argument must have 'read' attribute"); |