mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Use identifier API for PyObject_GetAttrString.
This commit is contained in:
parent
794d567b17
commit
1ee1b6fe0d
28 changed files with 499 additions and 357 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue