From bfc6d74b257277d61395ed077e10a6fb9cfb583e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= <martin@v.loewis.de>
Date: Thu, 13 Oct 2011 20:03:57 +0200
Subject: Use GetAttrId directly. Proposed by Amaury.

---
 Objects/typeobject.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 526ad4c..61f5bb1 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6308,16 +6308,9 @@ supercheck(PyTypeObject *type, PyObject *obj)
     }
     else {
         /* Try the slow way */
-        PyObject *class_str = NULL;
         PyObject *class_attr;
 
-        class_str = _PyUnicode_FromId(&PyId___class__);
-        if (class_str == NULL)
-            return NULL;
-
-        class_attr = PyObject_GetAttr(obj, class_str);
-        Py_DECREF(class_str);
-
+        class_attr = _PyObject_GetAttrId(obj, &PyId___class__);
         if (class_attr != NULL &&
             PyType_Check(class_attr) &&
             (PyTypeObject *)class_attr != Py_TYPE(obj))
-- 
cgit v0.12