Re: odd return value in gconf_client_get_pair



On Wed, 2004-03-10 at 07:51, Havoc Pennington wrote:
> Keep in mind though that failed = GError was set, the value simply not
> existing is not considered an error. See GError docs in the glib ref
> manual for how GError works.

Right - sorry. I was misled from looking at bug #102050 - making the
modifications suggested there makes the code look like it should return
an error at that stage...

If I understand GError usage (doubtful), I think that the fix for that
bug is not to remove the sections handling the val == NULL cases, but

- val = gconf_client_get (client, key, err);
+ val = gconf_client_get (client, key, error);

in all of the gconf_client_get_* functions. This will make them handle &
return an error when NULL is returned because an error occurs, and also
makes the return values of gconf_client_get_pair make sense.

Does that sound right, or am I still missing something?

-- 
Kai Willadsen <kaiw itee uq edu au>




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