summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2017-02-21 14:57:25 (GMT)
committerGitHub <noreply@github.com>2017-02-21 14:57:25 (GMT)
commit3e8d6cb1892377394e4b11819c33fbac728ea9e0 (patch)
tree3c19c9f5601f19fd201488aec5b1d16287839b3c /Objects
parent3a9ac827c7c87dffc60c4200323948551bcb6662 (diff)
downloadcpython-3e8d6cb1892377394e4b11819c33fbac728ea9e0.zip
cpython-3e8d6cb1892377394e4b11819c33fbac728ea9e0.tar.gz
cpython-3e8d6cb1892377394e4b11819c33fbac728ea9e0.tar.bz2
bpo-29509: skip redundant intern (GH-197)
PyObject_GetAttrString intern temporary key string. It's completely redudant.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 5da6cff..40061b1 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -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);