[vlc-devel] [PATCH 17/22] vlc_arrays: DictHash output is always used as an int

Rémi Denis-Courmont remi at remlab.net
Mon Aug 3 14:54:51 CEST 2015


Le 2015-08-03 15:51, Steve Lhomme a écrit :
>> No. No. No. You get the same value. The high-order zero bits will be
>> discarded, but that does obviously not change the actual value.
>
> You get the same value with and without the cast, yes. But different
> input may produce the same hash output and that could be a problem.

That's the definition of a hash function.

> We should either output a uint64_t from this function or explain we 
> don't
> want the extra precision (using a cast ?).

I don't care. I dislike the design, the implementation and the (lack 
of) testing of the vlc array helpers.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list