From 62b1c8e2b1d33c6416969276409d7c4935dfaffd Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Mon, 20 Feb 2017 20:51:34 +0900 Subject: [PATCH] bpo-29509: skip redundant intern PyObject_GetAttrString intern temporary key string. It's redudant. --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/object.c b/Objects/object.c index 5da6cffdb98cfeb..40061b1b3c175d6 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);