mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-29509: skip redundant intern (GH-197)
PyObject_GetAttrString intern temporary key string. It's completely redudant.
This commit is contained in:
parent
3a9ac827c7
commit
3e8d6cb189
1 changed files with 1 additions and 1 deletions
|
|
@ -785,7 +785,7 @@ PyObject_GetAttrString(PyObject *v, const char *name)
|
|||
|
||||
if (Py_TYPE(v)->tp_getattr != NULL)
|
||||
return (*Py_TYPE(v)->tp_getattr)(v, (char*)name);
|
||||
w = PyUnicode_InternFromString(name);
|
||||
w = PyUnicode_FromString(name);
|
||||
if (w == NULL)
|
||||
return NULL;
|
||||
res = PyObject_GetAttr(v, w);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue