After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 549063 - gconf_entry_ref doesn't return the pointer to the reffed object
gconf_entry_ref doesn't return the pointer to the reffed object
Status: RESOLVED DUPLICATE of bug 629984
Product: GConf
Classification: Deprecated
Component: gconf
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-22 21:57 UTC by Tobias Mueller
Modified: 2010-11-30 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which returns a pointer on a just reffed GConfEntry (1.46 KB, patch)
2008-08-22 22:06 UTC, Tobias Mueller
none Details | Review

Description Tobias Mueller 2008-08-22 21:57:20 UTC
According to http://library.gnome.org/devel/gconf/2.23/gconf-gconf-value.html#gconf-entry-ref gconf_entry_ref doesn't return a pointer to the reffed object. That's bad, as others, like Vala, expect and rely on it (see bug 549061) especially because g_object_ref does it: http://library.gnome.org/devel/gobject/stable/gobject-The-Base-Object-Type.html#g-object-ref

So I propose to just return a pointer to the reffed object.
Comment 1 Tobias Mueller 2008-08-22 22:06:01 UTC
Created attachment 117245 [details] [review]
Patch which returns a pointer on a just reffed GConfEntry
Comment 2 Havoc Pennington 2008-08-22 22:13:06 UTC
Not sure changing API like this is a good idea...

* gconf is basically deprecated (in theory, if a replacement is ever finished), so it's best left sort of untouched except when really necessary. If you started touching gconf there are so many things to fix it's hard to know where to start.

* more concretely: any app relying on this would silently crash when compiled on older versions, which app developers might not appreciate very much. And users might not much like having to upgrade their OS to get a new gconf just because of this.

This seems like the sort of API extension that only makes sense if there are some more substantive API extensions planned also.
Comment 3 Tobias Mueller 2008-08-22 22:26:30 UTC
Hey Havoc :)

As you say for yourself, GConf is still in use. And I don't think it's wrong to improve things which are in use. Also I think this change makes sense to make it easier for developer who are used to the g_object_ref behaviour. If the developer wants to use this feature (and thus force the user to upgrade their version of GConf) I don't see why he or she shouldn't.

My life doesn't depend on this patch being accepted, especially as my current problem might be easily fixable in Vala, but still: I consider this a bug which should be fixed for the reasons stated above.
Comment 4 Havoc Pennington 2008-08-22 22:52:21 UTC
To be clear, I haven't touched gconf since 2003, so I'm just giving an opinion, not reviewing the patch one way or the other...
Comment 5 Christian Persch 2010-11-30 18:42:44 UTC

*** This bug has been marked as a duplicate of bug 629984 ***