[Python-checkins] cpython (3.2): Keep y a Py_hash_t instead of Py_uhash_t as it is compared with == -1 and the

gregory.p.smith python-checkins at python.org
Tue Dec 11 04:53:02 CET 2012


http://hg.python.org/cpython/rev/a8fb68576fa0
changeset: 80822:a8fb68576fa0
branch: 3.2
parent: 80820:5c4e440852db
user: Gregory P. Smith <greg at krypto.org>
date: Mon Dec 10 18:34:09 2012 -0800
summary:
 Keep y a Py_hash_t instead of Py_uhash_t as it is compared with == -1 and the
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.
files:
 Objects/tupleobject.c | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -315,7 +315,8 @@
 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;
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /