mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 02:47:52 +02:00
gobject: Allow passing %NULL for @data in g_object_remove_toggle_ref
gjs has some situations where it's not always aware of the @data that was passed into g_object_add_toggle_ref, so allow passing %NULL to just match on @notify. Rebased and updated by Nitin Wartkar Closes #817
This commit is contained in:
committed by
nitinosiris
parent
0c8740dc83
commit
edb40c7171
@@ -256,7 +256,8 @@ main (int argc,
|
||||
g_assert (object_destroyed == FALSE);
|
||||
|
||||
clear_flags ();
|
||||
g_object_remove_toggle_ref (object, toggle_ref2, GUINT_TO_POINTER (24));
|
||||
/* Check that removing a toggle ref with %NULL data works fine. */
|
||||
g_object_remove_toggle_ref (object, toggle_ref2, NULL);
|
||||
g_assert (toggle_ref1_weakened == FALSE);
|
||||
g_assert (toggle_ref1_strengthened == FALSE);
|
||||
g_assert (toggle_ref2_weakened == FALSE);
|
||||
|
Reference in New Issue
Block a user