[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)
Case Van Horsen
report at bugs.python.org
Sat Oct 23 04:10:00 CEST 2010
Case Van Horsen <casevh at gmail.com> added the comment:
I maintain gmpy and it needs to calculate hash values for integers, floats, and rationals. I converted my hash calculations to use Py_ssize_t in a 64-bit Windows enviroment. All my tests pass when I build Python with my previous patch.
In hindsight, I think I made a mistake in my previous patch by eliminating Py_hash_t and using Py_ssize_t/size_t. I ended up defining Py_hash_t and Py_uhash_t in gmpy to simplify the code and to easily support older versions of Python.
I will work on a patch that defines Py_hash_t and Py_uhash_t and upload it later this evening.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list