This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients LambertDW, Rhamphoryncus, chemacortes, jcea, mark.dickinson, pitrou, rhettinger
Date 2009-02-12.11:09:24
SpamBayes Score 3.66433e-06
Marked as misclassified No
Message-id <1234437002.7414.8.camel@fsol>
In-reply-to <>
> Just out of interest, why?  The cast is unnecessary:  there's no ambiguity 
> or undefinedness (the int -1 gets promoted to unsigned long, with 
> wraparound semantics), and neither gcc nor MSVC complains.

Well, I had memories of a weird signed/unsigned problem (issue4935) and
I wasn't sure whether it could raise its head in the present case or

> The latter doesn't
> require any special-casing for various pointer sizes.

The special casing is just there so as to make all pointer bits
participate in the final hash (which is what the original implementation
does). Otherwise we could just unconditionally cast to unsigned long.
Date User Action Args
2009-02-12 11:09:26pitrousetrecipients: + pitrou, rhettinger, jcea, chemacortes, mark.dickinson, Rhamphoryncus, LambertDW
2009-02-12 11:09:24pitroulinkissue5186 messages
2009-02-12 11:09:24pitroucreate