diff --git a/ChangeLog b/ChangeLog index b08061aa69..20d34e1a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-04-04 Tim-Philipp Müller + + Patch by: Paolo Borelli + + * gst/gstplugin.c: (gst_plugin_finalize), (gst_plugin_class_init), + (gst_plugin_check_license): + minor clean-ups: G_DEFINE_TYPE already takes care of the + parent_class stuff, no need to do it twice. Mark array of + license strings as constant. (#337103) + 2006-04-04 Michael Smith * tools/gst-inspect.c: (print_element_list): diff --git a/gst/gstplugin.c b/gst/gstplugin.c index d3d89d731c..b2a5977f97 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -95,7 +95,7 @@ static gboolean _gst_plugin_fault_handler_is_setup = FALSE; * QPL: http://www.trolltech.com/licenses/qpl.html * MPL: http://www.opensource.org/licenses/mozilla1.1.php */ -static gchar *valid_licenses[] = { +static const gchar *valid_licenses[] = { "LGPL", /* GNU Lesser General Public License */ "GPL", /* GNU General Public License */ "QPL", /* Trolltech Qt Public License */ @@ -115,8 +115,6 @@ static void gst_plugin_desc_free (GstPluginDesc * desc); G_DEFINE_TYPE (GstPlugin, gst_plugin, GST_TYPE_OBJECT); -static GstObjectClass *parent_class = NULL; - static void gst_plugin_init (GstPlugin * plugin) { @@ -140,14 +138,12 @@ gst_plugin_finalize (GObject * object) g_free (plugin->basename); gst_plugin_desc_free (&plugin->desc); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (gst_plugin_parent_class)->finalize (object); } static void gst_plugin_class_init (GstPluginClass * klass) { - parent_class = g_type_class_ref (GST_TYPE_OBJECT); - G_OBJECT_CLASS (klass)->finalize = GST_DEBUG_FUNCPTR (gst_plugin_finalize); } @@ -206,7 +202,7 @@ _gst_plugin_initialize (void) static gboolean gst_plugin_check_license (const gchar * license) { - gchar **check_license = valid_licenses; + const gchar **check_license = valid_licenses; g_assert (check_license);