Case Van Horsen <cas...@gmail.com> added the comment:

Some quick comments on the latest patch.

1) I don't think you can remove the type cast used when comparing the hash 
value against -1 and -2. IIRC, GCC considers that undefined behavior.

2) In sysmodule.c, we need to use PyLong_FromSsize_t when storing 
_PyHASH_MODULUS.

3) In pyport.h, we need a better way to define _PyHASH_MODULUS. The existing 
"((1UL << _PyHASH_BITS) - 1)" fails when unsigned long is smaller than 
Py_ssize_t. "((1ULL << _PyHASH_BITS) - 1)" works on 64-bit Windows but is not a 
good solution for systems that don't have an unsigned long long type. I haven't 
thought of a better solution for one.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9778>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to