summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-17 20:54:53 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-17 20:54:53 (GMT)
commit8f67d0893f7170986b0ad370844318544270cbcc (patch)
tree4aec6cf093d4d042d18d1fadc3ce52765d32bd8d /Python/bltinmodule.c
parent6fb457526cef485d64f4f6744d81cae8c02032b3 (diff)
downloadcpython-8f67d0893f7170986b0ad370844318544270cbcc.zip
cpython-8f67d0893f7170986b0ad370844318544270cbcc.tar.gz
cpython-8f67d0893f7170986b0ad370844318544270cbcc.tar.bz2
make hashes always the size of pointers; introduce Py_hash_t #9778
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index ece2a37..4604519 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,