Re: [Vala] Libgee problem



Jamie McCracken wrote:
In Genie we automatically determine the hash function to use based on
type (unlike vala which has to specify the hash function)

Libgee does that automatically since 0.5. At least for 'int' and
'string' it works.

http://live.gnome.org/Libgee/NewAndNoteworthy-0.5

"All implementations now provide sane defaults when constructed without
any function arguments, using 'Functions'."

So you can do

  var map = new HashMap<string> ();

instead of

  var map = new HashMap<string> (str_hash, str_equal);

in Vala.



Best regards,

Frederik



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