[Gossip-dev] [Telepathy] rework of the UI

Xavier Claessens xclaesse at gmail.com
Wed Sep 13 19:09:24 CEST 2006


Le mercredi 13 septembre 2006 à 18:56 +0200, Richard Hult a écrit :
> >> * 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.

With telepathy it won't be completly internal since those values will be
given by telepathy... I'm not absolutely sure about that, Eitan can
confirm ?

> >> * ...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 :)

I agree, Eitan and Martyn told me to use datalist but I'm not sure it's
the best way... Eitan what's your opinion by reading the code ?

Xavier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.imendio.com/pipermail/gossip-dev/attachments/20060913/8cd47440/attachment.pgp


More information about the Gossip-dev mailing list