]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix debug assertion
authorBenjamin Peterson <benjamin@python.org>
Fri, 5 Feb 2016 06:26:10 +0000 (22:26 -0800)
committerBenjamin Peterson <benjamin@python.org>
Fri, 5 Feb 2016 06:26:10 +0000 (22:26 -0800)
Objects/typeobject.c

index a9ea2c2ea2b90e3a56f3101bcb686118440a5e97..63fd5aeb64c02602f5a8399d383d3e4ad705781a 100644 (file)
@@ -2565,7 +2565,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
         method_cache[h].version = type->tp_version_tag;
         method_cache[h].value = res;  /* borrowed */
         Py_INCREF(name);
-        assert(((PyASCIIObject *)(name))->hash != -1);
+        assert(((PyStringObject *)(name))->hash != -1);
 #if MCACHE_STATS
         if (method_cache[h].name != Py_None && method_cache[h].name != name)
             method_cache_collisions++;