[Gossip-dev] [Telepathy] rework of the UI
Richard Hult
richard at imendio.com
Wed Sep 13 18:56:21 CEST 2006
>> * g_value_transform looks suspicious, is that right? don't you just want
>> to copy the value?
> g_value_transform copy the value and make some casting too. For example
> it accept to copy a g_value containing a G_TYPE_UINT to G_TYPE_INT. I
> think g_value_copy will make a warning if types are not exactly the
> same.
I'd say that since this is completely internal to libgossip, using the
wrong types here is a programming bug, so if we make this stricter
that's just a good thing in my opinion.
>> * ...what's the reason really to have a datalist, when a hashtable would
>> work just as fine and probably be simpler and less code?
> Seems almost the same, Eitan Isaacson told me he would like to use
> g_datalist. As I understand g_datalist can be more efficient because it
> searches values using a GQuark (integer value) instead of a string...
> but that's almost a matter of s/g_datalist_get_data/g_hash_table_lookup/
Performance will never be an issue for this kind of thing, code
clarity/simplicity is worth a lot more. Unless you plan on looking up
100 000 params in a tight loop or something :)
/Richard
--
Imendio AB, http://www.imendio.com/
More information about the Gossip-dev
mailing list