From e1294397d70c4f72df39c26f0db9a3ac2f5b83f1 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 18 May 2010 18:35:58 +0200 Subject: miniobject: cleanup type registration a little We can make some structs const static with little effort. --- gst/gstminiobject.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gst/gstminiobject.c') diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index c7d2bb836..c5606d80b 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -71,7 +71,7 @@ gst_mini_object_get_type (void) static GType _gst_mini_object_type = 0; if (G_UNLIKELY (_gst_mini_object_type == 0)) { - GTypeValueTable value_table = { + static const GTypeValueTable value_table = { gst_value_mini_object_init, gst_value_mini_object_free, gst_value_mini_object_copy, @@ -81,7 +81,7 @@ gst_mini_object_get_type (void) (char *) "p", gst_value_mini_object_lcopy }; - GTypeInfo mini_object_info = { + static const GTypeInfo mini_object_info = { sizeof (GstMiniObjectClass), #if 0 gst_mini_object_base_init, @@ -95,15 +95,13 @@ gst_mini_object_get_type (void) sizeof (GstMiniObject), 0, (GInstanceInitFunc) gst_mini_object_init, - NULL + &value_table }; static const GTypeFundamentalInfo mini_object_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - mini_object_info.value_table = &value_table; - _gst_mini_object_type = g_type_fundamental_next (); g_type_register_fundamental (_gst_mini_object_type, "GstMiniObject", &mini_object_info, &mini_object_fundamental_info, G_TYPE_FLAG_ABSTRACT); -- cgit v1.2.3