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 617973 - Fix annotations for gconf_client_notify_add()
Fix annotations for gconf_client_notify_add()
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: gconf
unspecified
Other All
: Normal normal
: ---
Assigned To: GConf Maintainers
GConf Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-06 21:53 UTC by Owen Taylor
Modified: 2010-05-07 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix annotations for gconf_client_notify_add() (1.68 KB, patch)
2010-05-06 21:53 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-05-06 21:53:38 UTC
Since gconf_client_notify_add() weirdly uses GFreeFunc rather
than the identical GDestroyNotify we need to explicit annotate
which parameter is the destroy callback.

Scan the C files for annotations so that we pick up this
annotation addition.
Comment 1 Owen Taylor 2010-05-06 21:53:40 UTC
Created attachment 160469 [details] [review]
Fix annotations for gconf_client_notify_add()
Comment 2 Colin Walters 2010-05-07 02:09:15 UTC
Review of attachment 160469 [details] [review]:

Yep.
Comment 3 Ray Strode [halfline] 2010-05-07 14:21:00 UTC
Since GFreeFunc and GDestroyNotify are both in glib, shouldn't the parser handle both identically?
Comment 4 Owen Taylor 2010-05-07 14:36:42 UTC
(In reply to comment #3)
> Since GFreeFunc and GDestroyNotify are both in glib, shouldn't the parser
> handle both identically?

The parser actually special cases GDestroyNotify. I don't do think doing the same for GFreeFunc makes sense. It's history is:

Tue Nov 24 14:05:47 EST 1998    Michael K. Johnson <johnsonm@redhat.com>

        * glib.h: added GFreeFunc and g_hash_table_set_key_freefunc()
        prototype.

Thu Nov 26 01:36:20 1998  Tim Janik  <timj@gtk.org>

        * ghash.c: reverted the g_hash_table_set_key_freefunc() addition,
        since it's to specialized and needs to be resolved in a generic
        fashion.

And Tim forgot to remove the typedef.

When g_hash_table_new_full() was added in 2001 it used the expected GDestroyNotify.
Comment 5 Owen Taylor 2010-05-07 16:13:32 UTC
Same annotation addition was reviewed for gir-repository, so I'm going to go ahead and commit this.

Attachment 160469 [details] pushed as d5e22de - Fix annotations for gconf_client_notify_add()