Re: glib/gdataset.c (quarky / stringy stuff)
- From: Emmanuele Bassi <ebassi gmail com>
- To: David Nečas <yeti physics muni cz>
- Cc: ML-gtk <gtk-list gnome org>
- Subject: Re: glib/gdataset.c (quarky / stringy stuff)
- Date: Mon, 20 Oct 2014 11:32:33 +0100
hi;
On 20 October 2014 10:58, David Nečas <yeti physics muni cz> wrote:
On Mon, Oct 20, 2014 at 10:39:54AM +0100, John Emmas wrote:
Is that change effectively equivalent to what I did locally?
No. As far as I can tell you can pass NULL key to g_datalist_get_data()
after this change. If you do so and g_quark_to_string(data->key)
returns NULL (for whatever reason), the two NULLs will be considered
equal by g_strcmp0(). Whereas your change makes a NULL not-equal to
everything, even another NULL.
except that g_quark_to_string() can only return NULL if you passed
random garbage to it, because if a quark exists then a string
associated to it has to exist as well.
ciao,
Emmanuele.
--
http://www.bassi.io
[ ] ebassi [ gmail com]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]