gst/gstplugin.c: minor clean-ups: G_DEFINE_TYPE already takes care of the parent_class stuff, no need to do it twice....

Original commit message from CVS:
Patch by: Paolo Borelli  <pborelli at katamail dot com>
* 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)
This commit is contained in:
Paolo Borelli 2006-04-04 18:02:07 +00:00 committed by Tim-Philipp Müller
parent 3c048726f5
commit 0f2b215959
2 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,13 @@
2006-04-04 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Paolo Borelli <pborelli at katamail dot com>
* 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 <msmith@fluendo.com>
* tools/gst-inspect.c: (print_element_list):

View file

@ -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);