Re: [Telepathy] rework of the UI

Xavier Claessens <[email protected]> Wed, 13 Sep 2006 19:09:24 +0200
Newsgroups gmane.comp.gnome.gossip.devel
Message-ID <1158167364.4680.43.camel@zdra-desktop>
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.

_______________________________________________
Gossip-dev mailing list
[email protected]
http://lists.imendio.com/mailman/listinfo/gossip-dev
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBFCDtE6dEBUn2qPAMRAjsrAJ9dwdL+IPYUAvEdYvJz7wG1lxzIrACeMjA7
biurzD8Ci80KZ5ePQokyExI=
=Bol5
-----END PGP SIGNATURE-----