Richard Damon
8/28/2011 1:41:00 AM
On 8/27/11 2:14 PM, Jorgen Grahn wrote:
> On Wed, 2011-08-24, Richard Damon wrote:
> ...
>> My guess is that this is code to emulate uint32_t on a machine that
>> doesn't have a proper uint32_t, or may not be of type uint32_t. (perhaps
>> u32 is an 36 or 64 bit unsigned, as that is as close as the platform
>> provides, but they needed exact emulation for this result.
>
> What do you mean by "may not be of type uint32_t"?
>
> Surely, uint32_t has to be exactly 32 bits if your environment
> provides it? There's uint_least32_t for the other cases.
>
> /Jorgen
>
The code calls the type U32, not uint32_t. It also is a macro so we
don't really know what type the parameters are.
If the type IS uint32_t, the extra complication should not be needed, so
my assumption is that the programmer didn't want to assume that this is
what he had, but did want the results as if he had them.