]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Stop GCC warning about int literal that's so long that it becomes an
authorGuido van Rossum <guido@python.org>
Mon, 24 Nov 2003 04:13:13 +0000 (04:13 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 24 Nov 2003 04:13:13 +0000 (04:13 +0000)
unsigned int (on a 32-bit machine), by adding an explicit 'u' to the
literal (a prime used to improve the hash function for frozenset).

Objects/setobject.c

index 01f05883e232bba7ff48eb7af9ea2590a68ae9de..74b97615aa3f3ffbac7b299f6e279b1c52ddf491 100644 (file)
@@ -727,7 +727,7 @@ frozenset_hash(PyObject *self)
                   use cases have many combinations of a small number of 
                   elements with nearby hashes so that many distinct combinations
                   collapse to only a handful of distinct hash values. */
-               hash ^= PyObject_Hash(item) * 3644798167;
+               hash ^= PyObject_Hash(item) * 3644798167u;
                Py_DECREF(item);
        }
        Py_DECREF(it);