boxes: Use G_DEFINE_BOXED_TYPE to define the type

https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
This commit is contained in:
Marco Trevisan (Treviño) 2019-05-14 14:09:30 -05:00
parent 85c2aef4bc
commit 0aa4a526c6

View File

@ -55,17 +55,8 @@ meta_rectangle_free (MetaRectangle *rect)
g_free (rect); g_free (rect);
} }
GType G_DEFINE_BOXED_TYPE (MetaRectangle, meta_rectangle,
meta_rectangle_get_type (void) meta_rectangle_copy, meta_rectangle_free);
{
static GType type_id = 0;
if (!type_id)
type_id = g_boxed_type_register_static (g_intern_static_string ("MetaRectangle"),
(GBoxedCopyFunc) meta_rectangle_copy,
(GBoxedFreeFunc) meta_rectangle_free);
return type_id;
}
char* char*
meta_rectangle_to_string (const MetaRectangle *rect, meta_rectangle_to_string (const MetaRectangle *rect,