mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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:
parent
21b2933456
commit
2ff2190b62
4 changed files with 20 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue