Message186439
> > 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) |
|
| Date |
User |
Action |
Args |
| 2013-04-09 16:23:17 | gregory.p.smith | set | recipients:
+ 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:16 | gregory.p.smith | set | messageid: <[email protected]> |
| 2013-04-09 16:23:16 | gregory.p.smith | link | issue16427 messages |
| 2013-04-09 16:23:16 | gregory.p.smith | create | |
|