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 gregory.p.smith
Recipients asvetlov, christian.heimes, gregory.p.smith, jcea, mark.dickinson, neologix, pitrou, python-dev, rhettinger, serhiy.storchaka, skrah, tim.peters, vstinner
Date 2013-04-09.16:23:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> > Note that the patch uses type punning through a union
>
> What is the standard and portable way to cast an array of bytes to size_t?

I'd expect just casting the pointer type before dereferencing:

unsigned char *p;
...
hash = (multiplier * hash) ^ *((Py_uhash_t *)p);

(don't use size_t, use Py_uhash_t)
History
Date User Action Args
2013-04-09 16:23:17gregory.p.smithsetrecipients: + gregory.p.smith, tim.peters, rhettinger, jcea, mark.dickinson, pitrou, vstinner, christian.heimes, asvetlov, skrah, neologix, python-dev, serhiy.storchaka
2013-04-09 16:23:16gregory.p.smithsetmessageid: <[email protected]>
2013-04-09 16:23:16gregory.p.smithlinkissue16427 messages
2013-04-09 16:23:16gregory.p.smithcreate