]> granicus.if.org Git - python/commitdiff
Keep y a Py_hash_t instead of Py_uhash_t as it is compared with == -1 and the
authorGregory P. Smith <greg@krypto.org>
Tue, 11 Dec 2012 02:34:09 +0000 (18:34 -0800)
committerGregory P. Smith <greg@krypto.org>
Tue, 11 Dec 2012 02:34:09 +0000 (18:34 -0800)
compiler logic will do the right thing with just x as a Py_uhash_t.  This
matches what was already done in the 3.3 version.

cleanup only - no functionality or hash values change.

Objects/tupleobject.c

index c725227979bc09d12107459f79e0edacad8981f3..9e914cb6344858f2560cc4f84698f7d042a34dc3 100644 (file)
@@ -315,7 +315,8 @@ error:
 static Py_hash_t
 tuplehash(PyTupleObject *v)
 {
-    register Py_uhash_t x, y;  /* Unsigned for defined overflow behavior. */
+    register Py_uhash_t x;  /* Unsigned for defined overflow behavior. */
+    register Py_hash_t y;
     register Py_ssize_t len = Py_SIZE(v);
     register PyObject **p;
     Py_uhash_t mult = _PyHASH_MULTIPLIER;