[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 05:35:40 CEST 2010


Case Van Horsen <casevh at gmail.com> added the comment:

I've uploaded a patch against the current svn trunk that:

1) Defines a Py_uhash_t as equivalent to size_t.
2) Correctly defines _PyHASH_MODULUS on Win64.
3) Replaces several PyLong_FromLong with PyLong_FromSsize_t.
4) Change typeobject/wrap_hashfunc to use Py_hash_t instead of long.
5) Change tupleobject/tuplehash to use Py_hast_t instead of long.
6) Change long/double/complex hash functions to use Py_uhash_t instead of unsigned long.

----------
Added file: http://bugs.python.org/file19338/Py_uhash_t_patch.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9778>
_______________________________________


More information about the Python-bugs-list mailing list