Merge branch 'th/gobject-carray-comment' into 'main'

[th/gobject-carray-comment] gobject: remove obsolete code comment about CArray

See merge request GNOME/glib!3866
This commit is contained in:
Philip Withnall 2024-01-31 14:09:04 +00:00
commit 7b5bcf62b8

View File

@ -613,9 +613,7 @@ g_object_base_class_finalize (GObjectClass *class)
static void
g_object_do_class_init (GObjectClass *class)
{
/* read the comment about typedef struct CArray; on why not to change this quark */
quark_closure_array = g_quark_from_static_string ("GObject-closure-array");
quark_weak_notifies = g_quark_from_static_string ("GObject-weak-notifies");
quark_weak_locations = g_quark_from_static_string ("GObject-weak-locations");
quark_toggle_refs = g_quark_from_static_string ("GObject-toggle-references");
@ -4801,24 +4799,6 @@ typedef struct {
guint n_closures;
GClosure *closures[1]; /* flexible array */
} CArray;
/* don't change this structure without supplying an accessor for
* watched closures, e.g.:
* GSList* g_object_list_watched_closures (GObject *object)
* {
* CArray *carray;
* g_return_val_if_fail (G_IS_OBJECT (object), NULL);
* carray = g_object_get_data (object, "GObject-closure-array");
* if (carray)
* {
* GSList *slist = NULL;
* guint i;
* for (i = 0; i < carray->n_closures; i++)
* slist = g_slist_prepend (slist, carray->closures[i]);
* return slist;
* }
* return NULL;
* }
*/
static void
object_remove_closure (gpointer data,