Commit 3e8d6cb1 authored by INADA Naoki's avatar INADA Naoki Committed by GitHub

bpo-29509: skip redundant intern (GH-197)

PyObject_GetAttrString intern temporary key string.
It's completely redudant.
parent 3a9ac827
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment