Message 119079 - Python tracker (original) (raw)
Wouldn't it be cleaner if x was the same type as hash? Note that unsigned long is now wrong. What is needed is "unsigned integer type of the same size as Py_hash_t." If Py_hash_t has to stay signed, I think we should at least not rely of sizeof(Py_hash_t) to always remain the same as sizeof(size_t).
But this is an absolute requirement, a guarantee that we provide forever, and the whole point of this patch. Py_hash_t will be a signed version of size_t, just as Py_ssize_t. Not by chance, but by careful, inherent design.