g_int_hash function

I am using the glib hash functions, and by my reading of the reference
manual, g_int_hash (and for that matter g_int_equal) should be taking an
integer value that has been cast to a gconstpointer and comparing them
by value. In practice though, g_int_hash takes a pointer to an int and
manipulates that, whilst g_direct_hash seems to act the way g_int_hash
is documented (for unsigned ints).
Which is correct, the documentation or the implementation?

"I do not approve of anything that tampers with natural
 ignorance. Ignorance is like a delicate exotic fruit;
 touch it and the bloom is gone."
Lady Bracknell - The Importance of Being Earnest.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]