make hashes always the size of pointers; introduce Py_hash_t #9778
diff --git a/Include/pyport.h b/Include/pyport.h
index 5e98f0b..4331bf9 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -130,7 +130,7 @@
    _PyHash_Double in Objects/object.c.  Numeric hashes are based on
    reduction modulo the prime 2**_PyHASH_BITS - 1. */
 
-#if SIZEOF_LONG >= 8
+#if SIZEOF_VOID_P >= 8
 #define _PyHASH_BITS 61
 #else
 #define _PyHASH_BITS 31
@@ -177,6 +177,9 @@
 #   error "Python needs a typedef for Py_ssize_t in pyport.h."
 #endif
 
+/* Py_hash_t is the same size as a pointer. */
+typedef Py_ssize_t Py_hash_t;
+
 /* Largest possible value of size_t.
    SIZE_MAX is part of C99, so it might be defined on some
    platforms. If it is not defined, (size_t)-1 is a portable