Mercurial > cpython-lru_cache-weakref
changeset 57631:16691bc8b189 legacy-trunk
substitute PyDict_Check() for PyObject_IsInstance
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Thu, 10 Dec 2009 03:37:59 +0000 |
| parents | 750e75d93021 |
| children | 57ae5d44e731 |
| files | Objects/abstract.c |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Objects/abstract.c Wed Dec 09 16:41:39 2009 +0000 +++ b/Objects/abstract.c Thu Dec 10 03:37:59 2009 +0000 @@ -1810,7 +1810,7 @@ { if (s && PyInstance_Check(s)) return PyObject_HasAttrString(s, "__getitem__"); - if (PyObject_IsInstance(s, (PyObject *)&PyDict_Type)) + if (PyDict_Check(s)) return 0; return s != NULL && s->ob_type->tp_as_sequence && s->ob_type->tp_as_sequence->sq_item != NULL;
