diff options
author | Christian Persch <chpe@gnome.org> | 2010-04-27 13:31:23 +0200 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2010-08-18 15:34:47 +0200 |
commit | ffa07ee21eac827d79e58fa565b2faf3ba662c46 (patch) | |
tree | 7244904942279a792e3ee199d6ee6559897711bb /gtk/gtkselection.c | |
parent | f730af8360b8785317f5ff5ad75961928c155157 (diff) | |
download | gtk+-ffa07ee21eac827d79e58fa565b2faf3ba662c46.tar.gz |
Use G_DEFINE_BOXED_TYPE
Bug #627214.
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r-- | gtk/gtkselection.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 5d6ad033c9..2e34884596 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -3110,31 +3110,13 @@ gtk_selection_data_free (GtkSelectionData *data) g_slice_free (GtkSelectionData, data); } -GType -gtk_selection_data_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static (I_("GtkSelectionData"), - (GBoxedCopyFunc) gtk_selection_data_copy, - (GBoxedFreeFunc) gtk_selection_data_free); - - return our_type; -} +G_DEFINE_BOXED_TYPE (GtkSelectionData, gtk_selection_data, + gtk_selection_data_copy, + gtk_selection_data_free) -GType -gtk_target_list_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static (I_("GtkTargetList"), - (GBoxedCopyFunc) gtk_target_list_ref, - (GBoxedFreeFunc) gtk_target_list_unref); - - return our_type; -} +G_DEFINE_BOXED_TYPE (GtkTargetList, gtk_target_list, + gtk_target_list_ref, + gtk_target_list_unref) static int gtk_selection_bytes_per_item (gint format) |