[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

Mark Dickinson report at bugs.python.org
Mon Sep 6 12:15:25 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

> ... change all hash values to be of Py_ssize_t values rather than C longs ...

Yes, please!  (Provided this change can go in before 3.2.)  For the numeric types at least, this should be a straightforward adjustment.

And while we're at it, we could clean up some of the undefined behaviour from integer overflow that's in the current hash functions (tuple.__hash__, for example).

----------

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


More information about the Python-bugs-list mailing list