From 3e8d6cb1892377394e4b11819c33fbac728ea9e0 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Tue, 21 Feb 2017 23:57:25 +0900 Subject: bpo-29509: skip redundant intern (GH-197) PyObject_GetAttrString intern temporary key string. It's completely redudant. --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v0.12