From: Benjamin Peterson Date: Tue, 21 Feb 2012 16:09:13 +0000 (-0500) Subject: merge 3.2 X-Git-Tag: v3.2.3rc1~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e249dcab7ad8b1bd3b84a44974cfe2746e4269d1;p=python merge 3.2 --- e249dcab7ad8b1bd3b84a44974cfe2746e4269d1 diff --cc Modules/_datetimemodule.c index 85c5c4de19,5401068cbc..8f571adf37 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@@ -2782,8 -2563,9 +2782,9 @@@ static Py_hash_ generic_hash(unsigned char *data, int len) { register unsigned char *p; - register long x; + register Py_hash_t x; + assert(_Py_HashSecret_Initialized); p = (unsigned char *) data; x = _Py_HashSecret.prefix; x ^= *p << 7; diff --cc Objects/bytesobject.c index d63fabcc9e,db93f37bac..62ddf21532 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@@ -873,8 -894,9 +873,9 @@@ bytes_hash(PyBytesObject *a { register Py_ssize_t len; register unsigned char *p; - register long x; + register Py_hash_t x; + assert(_Py_HashSecret_Initialized); if (a->ob_shash != -1) return a->ob_shash; len = Py_SIZE(a); diff --cc Objects/unicodeobject.c index 467f95c444,2ec878f916..b70666106d --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@@ -7671,8 -7339,9 +7671,9 @@@ unicode_hash(PyUnicodeObject *self { Py_ssize_t len; Py_UNICODE *p; - long x; + Py_hash_t x; + assert(_Py_HashSecret_Initialized); if (self->hash != -1) return self->hash; len = Py_SIZE(self);