diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-05-18 18:35:58 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-05-18 18:37:25 +0200 |
commit | e1294397d70c4f72df39c26f0db9a3ac2f5b83f1 (patch) | |
tree | 111173cadd6c6eeb8e21b364795d382d3932d5bb /gst/gstminiobject.c | |
parent | 4793930efb3f80cf83e0ca0546bf71514806a4a8 (diff) |
miniobject: cleanup type registration a little
We can make some structs const static with little effort.
Diffstat (limited to 'gst/gstminiobject.c')
-rw-r--r-- | gst/gstminiobject.c | 8 |
1 files changed, 3 insertions, 5 deletions
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); |