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 vstinner
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.14:59:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwbXV_Pm-rdqFG3k4hGJxn2E+mbE=OuOuXR2RnGh1=FRaw@mail.gmail.com>
In-reply-to <1365514977.15.0.996768791386.issue16427@psf.upfronthosting.co.za>
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?

2013/4/9 Charles-François Natali <report@bugs.python.org>:
>
> Charles-François Natali added the comment:
>
> Note that the patch uses type punning through a union: while GCC allows this, it's not allowed by ANSI (although since we're using a char [], it's somewhat a grey area). An aggresive compiler could optimiza the read/write away.
>
> ----------
> nosy: +neologix
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16427>
> _______________________________________
History
Date User Action Args
2013-04-09 14:59:40vstinnersetrecipients: + vstinner, tim.peters, rhettinger, gregory.p.smith, jcea, mark.dickinson, pitrou, christian.heimes, asvetlov, skrah, neologix, python-dev, serhiy.storchaka
2013-04-09 14:59:40vstinnerlinkissue16427 messages
2013-04-09 14:59:40vstinnercreate