[Python-checkins] cpython: Issue #19512: _count_elements() of _collections reuses PyId_get identifier

victor.stinner python-checkins at python.org
Thu Nov 7 00:03:02 CET 2013


http://hg.python.org/cpython/rev/dbee50619259
changeset:   86977:dbee50619259
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Nov 06 23:52:55 2013 +0100
summary:
  Issue #19512: _count_elements() of _collections reuses PyId_get identifier
instead of literal "get" string

files:
  Modules/_collectionsmodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -1816,7 +1816,7 @@
             Py_DECREF(key);
         }
     } else {
-        bound_get = PyObject_GetAttrString(mapping, "get");
+        bound_get = _PyObject_GetAttrId(mapping, &PyId_get);
         if (bound_get == NULL)
             goto done;
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list