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 343750 - g_object_set_data_full docs should state that destroy notify is ignored for NULL data
g_object_set_data_full docs should state that destroy notify is ignored for N...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-06-03 09:19 UTC by Christian Neumair
Modified: 2006-12-29 05:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Christian Neumair 2006-06-03 09:19:40 UTC
g_object_set_data_full ignores the passed-in destroy notify if the data parameter is NULL, but the docs don't state that.

Maybe the destroy parameter docs should be:

@destroy: function to call when the association is destroyed. Ignored if @data is %NULL.
Comment 1 Matthias Clasen 2006-06-04 02:03:27 UTC
what did you expect g_object_set_data_full (NULL,...) to
do with the destroy notify ?
Comment 2 Christian Neumair 2006-06-04 12:09:43 UTC
I mean

 g_object_set_data_full (object, "key", NULL, g_free);

The effect of the following call is undefined of course:

 g_object_set_data_full (NULL, "key", data, g_free);
Comment 3 Matthias Clasen 2006-12-29 05:08:19 UTC
2006-12-28  Matthias Clasen  <mclasen@redhat.com>

        * gobject/tmpl/objects.sgml: Clarify a detail about
        g_object_set_data_full.  (#343750, Christian Neumair)