Message186439
| 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 |
<1365524596.94.0.137332823413.issue16427@psf.upfronthosting.co.za> |
| 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: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: <1365524596.94.0.137332823413.issue16427@psf.upfronthosting.co.za> |
| 2013年04月09日 16:23:16 | gregory.p.smith | link | issue16427 messages |
| 2013年04月09日 16:23:16 | gregory.p.smith | create |
|