2012/8/31 Eliot Miranda <
[hidden email]>:
>
>
>
> On Thu, Aug 30, 2012 at 3:10 PM, Nicolas Cellier <
[hidden email]> wrote:
>>
>>
>> strange test in line 73:
>> if (!(size = sizeField(arg)))
>> size = argByteSize = sizeof(void *);
>> else
>> argByteSize = abs(size);
>>
>> for me, it means
>>
>> if (sizeField(arg) != 0)
>> size = argByteSize = sizeof(void *);
>> else
>> size = argByteSize = 0;
>
>
> you have it the wrong way round. It is equivalent to
>
> size = sizeField(arg);
> if (!size)
> size = argByteSize = sizeof(void *);
> else
> argByteSize = abs(size);
>
> which is equivalent to
>
> size = sizeField(arg);
> if (size == 0)
> size = argByteSize = sizeof(void *);
> else
> argByteSize = abs(size);
>
>>
>> is it intentional ?
>
>
Hem, my bad, as most humans, my logic failed at double negation...
if( size ) <=> if (size != 0)
if( ! size ) <=> if (! (size != 0)) <=> if (size == 0)
Eliot, this indicates that you and your code are too clever ;)
Nicolas
> yes.
>
>>
>>
>> Nicolas
>
>
>
>
> --
> best,
> Eliot
>
>