Commit b59b04dd authored by Benjamin Peterson's avatar Benjamin Peterson

fix hash member name (closes #22847)

parent 00f19eff
......@@ -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(((PyStringObject *)(name))->hash != -1);
assert(((PyStringObject *)(name))->ob_shash != -1);
#if MCACHE_STATS
if (method_cache[h].name != Py_None && method_cache[h].name != name)
method_cache_collisions++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment