Issue #18594: Fix the fast path for collections.Counter().

The path wasn't being taken due to an over-restrictive type check.
This commit is contained in:
Raymond Hettinger 2013-10-01 00:55:43 -07:00
parent 21b2933456
commit 2ff2190b62
4 changed files with 20 additions and 5 deletions

View file

@ -49,9 +49,6 @@ _Py_IDENTIFIER(__module__);
_Py_IDENTIFIER(__name__);
_Py_IDENTIFIER(__new__);
static PyObject *
_PyType_LookupId(PyTypeObject *type, struct _Py_Identifier *name);
static PyObject *
slot_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
@ -2589,7 +2586,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
return res;
}
static PyObject *
PyObject *
_PyType_LookupId(PyTypeObject *type, struct _Py_Identifier *name)
{
PyObject *oname;