diff Python/bltinmodule.c @ 65494:e8969fb822fc

make hashes always the size of pointers; introduce Py_hash_t #9778
author Benjamin Peterson <benjamin@python.org>
date Sun, 17 Oct 2010 20:54:53 +0000
parents 55ed5c524428
children 1b77f2eb1606
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sun Oct 17 20:17:41 2010 +0000
+++ b/Python/bltinmodule.c	Sun Oct 17 20:54:53 2010 +0000
@@ -1148,12 +1148,12 @@
 static PyObject *
 builtin_hash(PyObject *self, PyObject *v)
 {
-    long x;
+    Py_hash_t x;
 
     x = PyObject_Hash(v);
     if (x == -1)
         return NULL;
-    return PyLong_FromLong(x);
+    return PyLong_FromSsize_t(x);
 }
 
 PyDoc_STRVAR(hash_doc,