From 8f67d0893f7170986b0ad370844318544270cbcc Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 17 Oct 2010 20:54:53 +0000 Subject: make hashes always the size of pointers; introduce Py_hash_t #9778 --- Python/bltinmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index ece2a3728e..46045192cf 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1148,12 +1148,12 @@ Delete a named attribute on an object; delattr(x, 'y') is equivalent to\n\ 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, -- cgit v1.2.1