]> granicus.if.org Git - python/commitdiff
Issue #19512: _count_elements() of _collections reuses PyId_get identifier
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 6 Nov 2013 22:52:55 +0000 (23:52 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 6 Nov 2013 22:52:55 +0000 (23:52 +0100)
instead of literal "get" string

Modules/_collectionsmodule.c

index 0cc013b03d7e88148552c41a65bab3f141e7053b..310e67207e7b0236d4891f86b4e98111d252b8c3 100644 (file)
@@ -1816,7 +1816,7 @@ _count_elements(PyObject *self, PyObject *args)
             Py_DECREF(key);
         }
     } else {
-        bound_get = PyObject_GetAttrString(mapping, "get");
+        bound_get = _PyObject_GetAttrId(mapping, &PyId_get);
         if (bound_get == NULL)
             goto done;